Skip to content

Commit 1ef3d61

Browse files
committed
Permit warnings in *_stale_pyc tests
The *_stale_pyc test is repeatedly failing on production systems due to additional pytest plugins being installed and triggering PytestAssertRewriteWarnings. This causes 'passed *' string not to match because of the ',' after 'passed'. Match just 'passed*' instead to solve this.
1 parent b3a051c commit 1ef3d61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_pytest_mock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ def test_foo(mocker):
809809
"""
810810
)
811811
result = testdir.runpytest()
812-
result.stdout.fnmatch_lines("* 1 passed *")
812+
result.stdout.fnmatch_lines("* 1 passed*")
813813

814814
kwargs = {"legacy": True}
815815
assert compileall.compile_file(str(py_fn), **kwargs)
@@ -819,7 +819,7 @@ def test_foo(mocker):
819819

820820
py_fn.remove()
821821
result = testdir.runpytest()
822-
result.stdout.fnmatch_lines("* 1 passed *")
822+
result.stdout.fnmatch_lines("* 1 passed*")
823823

824824

825825
def test_used_with_class_scope(testdir):

0 commit comments

Comments
 (0)