Skip to content

Commit 2547178

Browse files
committed
Using assert_outcomes as that is slightly safer
See #190 for context.
1 parent 1ef3d61 commit 2547178

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.assert_outcomes(passed=1)
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.assert_outcomes(passed=1)
823823

824824

825825
def test_used_with_class_scope(testdir):

0 commit comments

Comments
 (0)