change one output, make 2 variables to testing routine arguments
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Fri, 17 Jun 2016 07:31:50 +0000 (09:31 +0200)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Fri, 17 Jun 2016 07:31:50 +0000 (09:31 +0200)
testing/test_multivol_compression_sizes.py

index a2cdf4b..fff069c 100644 (file)
@@ -233,7 +233,7 @@ def test(volume_size, input_size_factor, mode, temp_dir, prefix='',
                 n_wrong_size += 1
 
         if debug_level:
-            print(prefix + 'compression ratio (input/compressed size): {:.1f}'
+            print(prefix + 'compression ratio (input/compressed size): {:.2f}'
                            .format(added_size/volume_size_sum))
 
         if n_wrong_size > 1:
@@ -316,7 +316,7 @@ def test(volume_size, input_size_factor, mode, temp_dir, prefix='',
     return something_strange
 
 
-def test_lots(fast_fail=False):
+def test_lots(fast_fail=False, debug_level=0, clean_up_if_error=False):
     """ Tests a lot of combinations of volume_size, input_size and mode
 
     :param bool fast_fail: set to True to stop after first error
@@ -333,9 +333,6 @@ def test_lots(fast_fail=False):
     modes = 'w|gz', 'w|bz2', 'w|xz', 'w#gz', 'w#gz.aes128', 'w#gz.aes256', \
             'w#aes128'
 
-    debug_level = 2
-    clean_up_if_error = False
-
     # create a temp dir for all input and output data
     temp_dir = mkdtemp(prefix='deltatar_cmprs_tst_')
     n_errs = 0