-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: separate out grouping-type tests #18057
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
xref #17996 @GuessWhoSamFoo inspiration from your PR. these grouping tests were all over the place. if you can rebase on top of this (and put your test in the test_grouping.py would be great), if not I can do it after. |
Codecov Report
@@ Coverage Diff @@
## master #18057 +/- ##
==========================================
+ Coverage 91.24% 91.25% +<.01%
==========================================
Files 163 163
Lines 50114 50115 +1
==========================================
+ Hits 45729 45733 +4
+ Misses 4385 4382 -3
Continue to review full report at Codecov.
|
@@ -0,0 +1,371 @@ | |||
# -*- coding: utf-8 -*- | |||
|
|||
""" test function application """ |
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.
If I hadn't looked at the filename, I would have been completely confused by this module docstring.
return df | ||
|
||
for isort, normalize, sort, ascending, dropna \ | ||
in product((False, True), repeat=5): |
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've generally preferred parentheses over back-slashes, but idk which one is used more here.
pytest.raises(KeyError, g.__getitem__, ['C']) # g[['C']] | ||
|
||
pytest.raises(KeyError, g.__getitem__, ['A', 'C']) # g[['A', 'C']] | ||
with tm.assert_raises_regex(KeyError, '^[^A]+$'): |
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.
On a somewhat relevant point to my comment in #18047, perhaps we need a built-in way to implement the assert not
checks so that we avoid ugly regex like this.
That's something to think about for the long-run and not necessarily for this PR.
No description provided.