Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture result namedtuple #2880

Merged

Conversation

samueldg
Copy link
Contributor

Return stdout/stderr capture results as a namedtuple,
so out and err can be accessed by attribute.

Includes tests for the capsys fixture, and for the context manager class.

Closes #2879

This allows accessing `out` and `err` directly by attribute,
while preserving tuple unpacking.

Also added tests, one for the `capsys` fixture, and one for the
`MultiCapture` class itself.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 92.681% when pulling 8e178e9 on samueldg:capture-result-namedtuple into def471b on pytest-dev:features.

@RonnyPfannschmidt
Copy link
Member

failures are unrelated, thanks 👍

@RonnyPfannschmidt RonnyPfannschmidt merged commit cb30848 into pytest-dev:features Oct 30, 2017
@samueldg samueldg deleted the capture-result-namedtuple branch November 10, 2017 06:28
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.

4 participants