fix some tests wrt to expecting output now that pytest does no
introduce unwanted "buffering" on "-s" calls.
This commit is contained in:
parent
684d7f8668
commit
da7133d201
|
@ -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:
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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*')
|
||||
|
|
|
@ -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*"
|
||||
])
|
||||
|
|
Loading…
Reference in New Issue