diff options
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/security-guidance/tests/test_interp_reparse_metric.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/security-guidance/tests/test_interp_reparse_metric.py b/plugins/security-guidance/tests/test_interp_reparse_metric.py index 90cbc78d..5d3f6f13 100644 --- a/plugins/security-guidance/tests/test_interp_reparse_metric.py +++ b/plugins/security-guidance/tests/test_interp_reparse_metric.py @@ -141,10 +141,11 @@ def test_unreadable_folder_is_skipped(): def test_each_folder_is_looked_at_once_and_only_up_to_the_link(): - prefix = os.path.join(os.sep, "a", "b", "c") + # abspath: on Windows the metric adds the current drive. + prefix = os.path.abspath(os.path.join(os.sep, "a", "b", "c")) calls = [] measure(exe(prefix), prefix, calls=calls) - assert sorted(calls) == sorted({exe(prefix), prefix, os.path.dirname(prefix), os.path.join(os.sep, "a")}) + assert sorted(calls) == sorted({exe(prefix), prefix, os.path.dirname(prefix), os.path.dirname(os.path.dirname(prefix))}) calls.clear() measure(exe(prefix), prefix, {prefix: SYMLINK}, calls=calls) assert calls == [exe(prefix), prefix] |
