You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all,
It looks like a function scope fixture is torn down after the printing of . in the console. I am writing a fixture which capture stdout/stderr to a file and it is capturing �[32m.�[0m before print('hello'):
@pytest.fixture
def my_fixture(request: FixtureRequest):
# setup capturing of stdout/stderr to a test-specific file
# ...
yield 'something'
print('hello')
# restore stdout/stderr
# ...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
It looks like a function scope fixture is torn down after the printing of
.
in the console. I am writing a fixture which capture stdout/stderr to a file and it is capturing�[32m.�[0m
beforeprint('hello')
:test-specific file content:
Am I doing anything wrong?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions