From: Christian Herdtweck Date: Mon, 25 Jul 2016 10:12:12 +0000 (+0200) Subject: improve output X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=9f97dfe33feffc19cf88346c877dd0bf901b0040;p=python-delta-tar improve output --- diff --git a/testing/test_volume_split.py b/testing/test_volume_split.py index 9b191d3..aef1cb0 100755 --- a/testing/test_volume_split.py +++ b/testing/test_volume_split.py @@ -238,6 +238,7 @@ def do_test(seed, create_mode, extract_mode, temp_dir, print_everything=False): os.unlink(file_name) # extract + dprnt('opening tar for extraction') with TarFile.open(mode=extract_mode, name=temp_file.name, debug=tar_debug, new_volume_handler=new_volume_handler) as tarobj: @@ -378,13 +379,14 @@ def test_forever(): if n_runs == 0: print('summary: no test run has finished') else: - print('summary: {} runs, in {}s ({:.3f}s per run); ' + print('summary: {} runs, in {:.3f}s ({:.3f}s per run); ' '{} with errs ({:.0f}%)' .format(n_runs, duration, duration/n_runs, n_errs, 100.0 * float(n_errs)/float(n_runs))) - print('params that created errors') - for params in error_params: - print(params) + if error_params: + print('params that created errors') + for params in error_params: + print(params) if __name__ == '__main__':