commit 3ad3dc950e5bc18e9af79da6e11cf37ae2e7f727 Author: Iain R. Learmonth irl@fsfe.org Date: Tue Feb 19 09:12:33 2019 +0000
Disable test_utils.test_find_file_paths_pairs
This test fails currently because the output of the function test_find_file_paths_pairs is not deterministic. It seems to depend on some ordering that happens due to the filesystem. --- onionperf/tests/test_utils.py | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/onionperf/tests/test_utils.py b/onionperf/tests/test_utils.py index 0e7dfeb..940e0b6 100644 --- a/onionperf/tests/test_utils.py +++ b/onionperf/tests/test_utils.py @@ -55,20 +55,24 @@ def test_find_file_paths_with_dash(): paths = util.find_file_paths(DATA_DIR + "/-", pattern) assert_equals(paths, ['-'])
-def test_find_file_paths_pairs(): - """ - Uses util.find_file_paths_pairs to find existing files in the test data - directory matching either of two given patterns. - it returns tuples consisting of a list containing matching file and an empty list. - The position of the empty lists is dependent on which pattern was matched. - If a file matches the first pattern, the second item in the tuple will be empty. - If a file matches the second pattern, the first item in the tuple will be empty. - """ - data_dir = "data" - first_pattern = ['.*tgen.log'] - second_pattern = ['.*torctl.log'] - paths = util.find_file_paths_pairs(data_dir, first_pattern, second_pattern) - assert_equals(paths, [([], ['data/logs/onionperf20190101.torctl.log']), ([], ['data/logs/onionperf.torctl.log']), (['data/logs/onionperf.tgen.log'], []), (['data/logs/onionperf20190101.tgen.log'], [])]) +#def test_find_file_paths_pairs(): +# """ +# Uses util.find_file_paths_pairs to find existing files in the test data +# directory matching either of two given patterns. +# it returns tuples consisting of a list containing matching file and an empty list. +# The position of the empty lists is dependent on which pattern was matched. +# If a file matches the first pattern, the second item in the tuple will be empty. +# If a file matches the second pattern, the first item in the tuple will be empty. +# """ +# first_pattern = ['.*tgen.log'] +# second_pattern = ['.*torctl.log'] +# paths = util.find_file_paths_pairs(DATA_DIR, first_pattern, second_pattern) +# assert_equals(paths, [ +# ([], [absolute_data_path("logs/onionperf20190101.torctl.log")]), +# ([], [absolute_data_path("logs/onionperf.torctl.log")]), +# ([absolute_data_path("logs/onionperf.tgen.log")], []), +# ([absolute_data_path("logs/onionperf20190101.tgen.log")], []) +# ])
def test_find_path_with_binpath(): """
tor-commits@lists.torproject.org