-
Notifications
You must be signed in to change notification settings - Fork 23
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
Log in subtests similar to stdout #91
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @rhoban13, this looks excellent!
Besides my comments, could you please update the CHANGELOG? Thanks!
I will be happy to make a new release once this is merged. 👍
Co-authored-by: Bruno Oliveira <[email protected]>
Co-authored-by: Bruno Oliveira <[email protected]>
@@ -176,14 +177,27 @@ def _capturing_output(self): | |||
fixture.close() | |||
captured.out = out | |||
captured.err = err | |||
|
|||
@contextmanager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticing the comment on line 154 above "# capsys or capfd are active, subtest should not capture". Do I need to do anything similar if the caplog
fixture is active?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, the logging capture supports multiple logs being captured at the same time, which is not true for capsys/capfd. 👍
5524165
to
4f39650
Compare
4f39650
to
9430a59
Compare
Thanks @rhoban13! |
Logging inside subtests is not displayed unless the parent test fails. This PR proposes capturing logging for each subtest similar to how stdout/stderr is currently captured and displaying with similar granularity.
fixes #87