improve output
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Mon, 25 Jul 2016 10:12:12 +0000 (12:12 +0200)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Thu, 12 Nov 2020 14:04:34 +0000 (15:04 +0100)
testing/test_volume_split.py

index 9b191d3..aef1cb0 100755 (executable)
@@ -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__':