From 98d57b0b27887ac68335c4f99f041d260fcd0784 Mon Sep 17 00:00:00 2001 From: devdanzin <74280297+devdanzin@users.noreply.github.com> Date: Sun, 28 Apr 2024 14:10:12 -0300 Subject: [PATCH 1/3] Support scrubbing temporary paths in test_html.py on Windows. --- tests/test_html.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_html.py b/tests/test_html.py index a2b592cbb..da8be575e 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -712,6 +712,7 @@ def compare_html( ] if env.WINDOWS: # For file paths... + scrubs += [(r'[A-Z]:\\Users\\[\w\\]+\\pytest-of-\w+\\pytest-\d+\\(popen-gw\d+\\)?t\d+', 'TEST_TMPDIR')] scrubs += [(r"\\", "/")] if extra_scrubs: scrubs += extra_scrubs From 0df3a27a8d06d48404ecae212eddb2ccec922e66 Mon Sep 17 00:00:00 2001 From: devdanzin <74280297+devdanzin@users.noreply.github.com> Date: Sun, 28 Apr 2024 14:44:12 -0300 Subject: [PATCH 2/3] Fix long line in test_html. --- tests/test_html.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_html.py b/tests/test_html.py index da8be575e..c4f7870d0 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -712,7 +712,10 @@ def compare_html( ] if env.WINDOWS: # For file paths... - scrubs += [(r'[A-Z]:\\Users\\[\w\\]+\\pytest-of-\w+\\pytest-\d+\\(popen-gw\d+\\)?t\d+', 'TEST_TMPDIR')] + scrubs += [ + (r'[A-Z]:\\Users\\[\w\\]+\\pytest-of-\w+\\pytest-\d+\\(popen-gw\d+\\)?t\d+', + 'TEST_TMPDIR') + ] scrubs += [(r"\\", "/")] if extra_scrubs: scrubs += extra_scrubs From b6813d2bb293c1ec26714a8d67336f69ed45d6fa Mon Sep 17 00:00:00 2001 From: devdanzin <74280297+devdanzin@users.noreply.github.com> Date: Tue, 30 Apr 2024 07:35:48 -0300 Subject: [PATCH 3/3] Use scrub for Windows path when running test suite in all OSes. --- tests/test_html.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/test_html.py b/tests/test_html.py index c4f7870d0..1cfbf963b 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -709,13 +709,10 @@ def compare_html( (filepath_to_regex(abs_file(os.getcwd())), 'TEST_TMPDIR'), (filepath_to_regex(flat_rootname(str(abs_file(os.getcwd())))), '_TEST_TMPDIR'), (r'/private/var/[\w/]+/pytest-of-\w+/pytest-\d+/(popen-gw\d+/)?t\d+', 'TEST_TMPDIR'), + (r'[A-Z]:\\Users\\[\w\\]+\\pytest-of-\w+\\pytest-\d+\\(popen-gw\d+\\)?t\d+', 'TEST_TMPDIR'), ] if env.WINDOWS: # For file paths... - scrubs += [ - (r'[A-Z]:\\Users\\[\w\\]+\\pytest-of-\w+\\pytest-\d+\\(popen-gw\d+\\)?t\d+', - 'TEST_TMPDIR') - ] scrubs += [(r"\\", "/")] if extra_scrubs: scrubs += extra_scrubs