Skip to content

Fixtures during teardown can use capsys and capfd to get output from tests#3830

Merged
nicoddemus merged 3 commits into
pytest-dev:masterfrom
nicoddemus:capfd-fixture-capture
Aug 20, 2018
Merged

Fixtures during teardown can use capsys and capfd to get output from tests#3830
nicoddemus merged 3 commits into
pytest-dev:masterfrom
nicoddemus:capfd-fixture-capture

Conversation

@nicoddemus

Copy link
Copy Markdown
Member

The problem is that the fixtures didn't live up to the promise to properly accumulate output between setup/call/teardown. This works in 3.2 because we didn't allow to access the fixture during setup/teardown from the first place, so it didn't need to accumulate any buffer.

Follow up to #3066, fixes #3033.

@nicoddemus

Copy link
Copy Markdown
Member Author

cc @trrichard

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.09%) to 92.638% when pulling f4c5994 on nicoddemus:capfd-fixture-capture into 28aff05 on pytest-dev:master.

@nicoddemus nicoddemus merged commit 43657f2 into pytest-dev:master Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

capfd not working in 3.3.1

4 participants