-
-
Notifications
You must be signed in to change notification settings - Fork 143
for issue 429 #433
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
for issue 429 #433
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.
See here:
pandas-stubs/tests/test_resampler.py
Line 304 in 97dfaa9
FutureWarning, match="Not prepending group keys", upper="1.5.99" |
for an example of how to use
pytest_warns_bounds
. You need to specify the upper
parameter
Yes sir |
Still not getting the checks passed after adding upper |
Use But before you push, you should test locally by running |
Yes sir |
It is still saying undefined name |
It means you didn't import it. Look at other examples. This is basic python programming. |
Sir what is the module to import |
Sorry it is |
yes sir |
Done sir |
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.
You changed WAY too many tests. Only change the ones listed in the original issue.
yes sir |
Done sir |
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 is trickier than I thought. You have to look at the 6 failures in the nightly CI and we have to put in something where if the pandas version is larger than the bound specified, we catch an exception rather than trap a warning. I think the right solution is to modify the implementation of pytest_warns_bounded
to return a different context manager if the version of pandas is >= the upper bound such that the context manager is trapping the exception. Use contextlib.supprress()
and you'd have to pass in the expected exception type.
This is non-trivial. I'm not sure you will be able to do it. If not, let me know, and I will take this over.
I think it would be better if you take over. |
closing in favor of #436 |
yes sir |
assert_type()
to assert the type of any return value