Skip to content

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

Merged
merged 1 commit into from
Nov 1, 2017
Merged

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Nov 1, 2017

No description provided.

@jreback jreback added Clean Groupby Testing pandas testing functions or related to the test suite labels Nov 1, 2017
@jreback jreback added this to the 0.22.0 milestone Nov 1, 2017
@jreback
Copy link
Contributor Author

jreback commented Nov 1, 2017

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
Copy link

codecov bot commented Nov 1, 2017

Codecov Report

Merging #18057 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Flag Coverage Δ
#multiple 89.06% <ø> (+0.02%) ⬆️
#single 40.32% <ø> (+0.02%) ⬆️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.75% <0%> (-0.1%) ⬇️
pandas/tslib.py 100% <0%> (ø) ⬆️
pandas/compat/pickle_compat.py 75.6% <0%> (ø) ⬆️
pandas/plotting/_converter.py 65.2% <0%> (+1.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d80a4b8...5cefd93. Read the comment docs.

@@ -0,0 +1,371 @@
# -*- coding: utf-8 -*-

""" test function application """
Copy link
Member

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):
Copy link
Member

@gfyoung gfyoung Nov 1, 2017

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]+$'):
Copy link
Member

@gfyoung gfyoung Nov 1, 2017

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.

@jreback jreback merged commit ff805c3 into pandas-dev:master Nov 1, 2017
1kastner pushed a commit to 1kastner/pandas that referenced this pull request Nov 5, 2017
No-Stream pushed a commit to No-Stream/pandas that referenced this pull request Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Groupby Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants