diff --git a/_pytest/python.py b/_pytest/python.py index a842c471d..7cfa7b051 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1623,7 +1623,7 @@ class FixtureManager: assert not name.startswith(self._argprefix) fixturedef = FixtureDef(self, nodeid, name, obj, marker.scope, marker.params, - marker.yieldctx, + yieldctx=marker.yieldctx, unittest=unittest) faclist = self._arg2fixturedefs.setdefault(name, []) if not fixturedef.has_location: diff --git a/testing/python/fixture.py b/testing/python/fixture.py index 30af8cf84..076b41a6e 100644 --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -1993,12 +1993,12 @@ class TestContextManagerFixtureFuncs: """) result = testdir.runpytest("-s") result.stdout.fnmatch_lines(""" - setup - test1 1 - teardown - setup - test2 1 - teardown + *setup* + *test1 1* + *teardown* + *setup* + *test2 1* + *teardown* """) def test_scoped(self, testdir): @@ -2016,10 +2016,10 @@ class TestContextManagerFixtureFuncs: """) result = testdir.runpytest("-s") result.stdout.fnmatch_lines(""" - setup - test1 1 - test2 1 - teardown + *setup* + *test1 1* + *test2 1* + *teardown* """) def test_setup_exception(self, testdir): diff --git a/testing/test_fixture_finalizer.py b/testing/test_fixture_finalizer.py index 0fdaa68fc..3126d140a 100644 --- a/testing/test_fixture_finalizer.py +++ b/testing/test_fixture_finalizer.py @@ -28,4 +28,4 @@ def test_fixture_finalizer(testdir): """)) reprec = testdir.runpytest("-s") for test in ['test_browser']: - reprec.stdout.fnmatch_lines('Finalized') + reprec.stdout.fnmatch_lines('*Finalized*') diff --git a/testing/test_terminal.py b/testing/test_terminal.py index 290967072..0507530a4 100644 --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -672,7 +672,7 @@ def test_fdopen_kept_alive_issue124(testdir): stdout = k.pop() stdout.close() """) - result = testdir.runpytest("-s") + result = testdir.runpytest() result.stdout.fnmatch_lines([ "*2 passed*" ])