From: Christian Herdtweck Date: Fri, 17 Jun 2016 07:31:50 +0000 (+0200) Subject: change one output, make 2 variables to testing routine arguments X-Git-Tag: v2.2~31 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=019388ae83a6f9dc1f9d2a9c62f7b65bac67a0f2;p=python-delta-tar change one output, make 2 variables to testing routine arguments --- diff --git a/testing/test_multivol_compression_sizes.py b/testing/test_multivol_compression_sizes.py index a2cdf4b..fff069c 100644 --- a/testing/test_multivol_compression_sizes.py +++ b/testing/test_multivol_compression_sizes.py @@ -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