-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: use capsys.readouterr() as named tuple #24489
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24489 +/- ##
=======================================
Coverage 92.3% 92.3%
=======================================
Files 166 166
Lines 52386 52386
=======================================
Hits 48357 48357
Misses 4029 4029
Continue to review full report at Codecov.
|
3 similar comments
Codecov Report
@@ Coverage Diff @@
## master #24489 +/- ##
=======================================
Coverage 92.3% 92.3%
=======================================
Files 166 166
Lines 52386 52386
=======================================
Hits 48357 48357
Misses 4029 4029
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #24489 +/- ##
=======================================
Coverage 92.3% 92.3%
=======================================
Files 166 166
Lines 52386 52386
=======================================
Hits 48357 48357
Misses 4029 4029
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #24489 +/- ##
=======================================
Coverage 92.3% 92.3%
=======================================
Files 166 166
Lines 52386 52386
=======================================
Hits 48357 48357
Misses 4029 4029
Continue to review full report at Codecov.
|
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.
This seems like a reasonable change.
cc @jreback
I wonder though: could we use this fixture to replace our existing capture_stdout
and capture_stderr
decorators in util/testing
? Does it suppress displaying the output written to stdout
/ stderr
?
@gfyoung #24489 (review) is in some separate PRs |
thanks! |
* upstream/master: DOC: Fixing broken references in the docs (pandas-dev#24497) DOC: Splitting api.rst in several files (pandas-dev#24462) Fix misdescription in escapechar (pandas-dev#24490) Floor and ceil methods during pandas.eval which are provided by numexpr (pandas-dev#24355) BUG: Pandas any() returning false with true values present (GH pandas-dev#23070) (pandas-dev#24434) Misc separable pieces of pandas-dev#24024 (pandas-dev#24488) use capsys.readouterr() as named tuple (pandas-dev#24489) REF/TST: replace capture_stderr with pytest capsys fixture (pandas-dev#24496) TST- Fixing issue with test_parquet test unexpectedly passing (pandas-dev#24480) DOC: Doc build for a single doc made much faster, and clean up (pandas-dev#24428) BUG: Fix+test timezone-preservation in DTA.repeat (pandas-dev#24483) Implement reductions from pandas-dev#24024 (pandas-dev#24484)
…strings * upstream/master: TST: Skip db tests unless explicitly specified in -m pattern (pandas-dev#24492) Mix EA into DTA/TDA; part of 24024 (pandas-dev#24502) DOC: Fix building of a single API document (pandas-dev#24506) DOC: Fixing broken references in the docs (pandas-dev#24497) DOC: Splitting api.rst in several files (pandas-dev#24462) Fix misdescription in escapechar (pandas-dev#24490) Floor and ceil methods during pandas.eval which are provided by numexpr (pandas-dev#24355) BUG: Pandas any() returning false with true values present (GH pandas-dev#23070) (pandas-dev#24434) Misc separable pieces of pandas-dev#24024 (pandas-dev#24488) use capsys.readouterr() as named tuple (pandas-dev#24489) REF/TST: replace capture_stderr with pytest capsys fixture (pandas-dev#24496) TST- Fixing issue with test_parquet test unexpectedly passing (pandas-dev#24480) DOC: Doc build for a single doc made much faster, and clean up (pandas-dev#24428) BUG: Fix+test timezone-preservation in DTA.repeat (pandas-dev#24483) Implement reductions from pandas-dev#24024 (pandas-dev#24484)
currently only one test in codebase uses capsys.readouterr().
from pytest 3.3, the return value from readouterr changed to a namedtuple with two attributes, out and err.
this change in the style of https://docs.pytest.org/en/latest/capture.html#accessing-captured-output-from-a-test-function is to ensure that the current usage in the codebase does not set a precedent for future usage.