-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Added capture_stderr decorator to test_validate_docstrings #22543
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 #22543 +/- ##
=======================================
Coverage 92.04% 92.04%
=======================================
Files 169 169
Lines 50787 50787
=======================================
Hits 46745 46745
Misses 4042 4042
Continue to review full report at Codecov.
|
@@ -673,7 +673,7 @@ def capture_stderr(f): | |||
AssertionError: assert 'foo\n' == 'bar\n' | |||
""" | |||
|
|||
@wraps(f) | |||
@compat.wraps(f) |
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.
Looks like wraps
wasn't preserving the signature in Py27 which would cause this to choke when combined with a parametrized function. Simply switched to the function from compat for now - providing as reference in case anyone runs into a similar issue in the future
looks fine. whare are they printing to stderr now? |
@jorisvandenbossche can you point me to where you were seeing this in Travis before? Worth double checking there that this has the intended effect |
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.
Once rebased, good to merge for me
See eg this build (on master) for where the output is currently displayed: https://travis-ci.org/pandas-dev/pandas/jobs/423640681. I can confirm this is fixed now.
@jorisvandenbossche all green after rebase |
Looks clean after rebase. I think we have enough approvals to merge this. 😄 |
git diff upstream/master -u -- "*.py" | flake8 --diff
Originally thought it would be nice to have this as a class decorator, but usage of this conflicts with the
capsys
fixture used bytest_bad_examples
so had to pick and choose where to apply. Additionally the decorator doesn't work out of the box to wrap classes, so it would take a decent amount more code.cc @gfyoung will present minor merge conflicts with your work in #22531