diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-23 17:24:25 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-23 17:34:53 -0400 |
commit | c8ac44828eddfcb444dcdcfc7668370054e96cb9 (patch) | |
tree | 78a9eabf603b786aae9455fd35a40c66ba16a10c | |
parent | bb2bc1a6295ee8fc4f3cccfe72aeb3d3ae5246cb (diff) | |
download | python-coveragepy-git-c8ac44828eddfcb444dcdcfc7668370054e96cb9.tar.gz |
test: sometimes pytest directories have a "popen" component
Those have to be scrubbed too. I'm not sure why it's sometimes there, sometimes
not. Maybe xdist?
-rw-r--r-- | tests/test_html.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_html.py b/tests/test_html.py index fa60952d..84cc2d4c 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -581,7 +581,7 @@ def compare_html(expected, actual, extra_scrubs=None): (filepath_to_regex(flat_rootname(str(os.getcwd()))), '_TEST_TMPDIR'), (filepath_to_regex(abs_file(os.getcwd())), 'TEST_TMPDIR'), (filepath_to_regex(flat_rootname(str(abs_file(os.getcwd())))), '_TEST_TMPDIR'), - (r'/private/var/folders/[\w/]{35}/pytest-of-\w+/pytest-\d+/t\d+', 'TEST_TMPDIR'), + (r'/private/var/[\w/]+/pytest-of-\w+/pytest-\d+/(popen-gw\d+/)?t\d+', 'TEST_TMPDIR'), ] if env.WINDOWS: # For file paths... @@ -852,9 +852,10 @@ assert len(math) == 18 ], ) contains( - "out/other/index.html", + 'out/other/index.html', '<a href="here_py.html">here.py</a>', - 'other_py.html">', 'other.py</a>', + 'other_py.html">', + 'other.py</a>', ) def test_partial(self): |