Skip to content

CLN: Address MulitIndex Test Follow Ups in Issue #21918 #21928

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 3 commits into from
Jul 24, 2018

Conversation

elmq0022
Copy link
Contributor

Addresses most of the issues. Left blowing away the old pickles for another issue which is still open.

@@ -234,29 +234,32 @@ def test_from_arrays_empty():
tm.assert_index_equal(result, expected)


def test_from_arrays_invalid_input():
@pytest.mark.parametrize('invalid_array', [
pytest.param(1),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you dont' need to use pytest.parma, just use tuples

@jreback jreback added Testing pandas testing functions or related to the test suite MultiIndex labels Jul 16, 2018
@jreback
Copy link
Contributor

jreback commented Jul 16, 2018

also merged #21900 so will need to rebase

removed test_operations.py

fixed syntax for python 2.7

fix comments from commit
@codecov
Copy link

codecov bot commented Jul 17, 2018

Codecov Report

Merging #21928 into master will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #21928      +/-   ##
==========================================
+ Coverage   91.96%   91.99%   +0.03%     
==========================================
  Files         166      167       +1     
  Lines       50323    50578     +255     
==========================================
+ Hits        46281    46531     +250     
- Misses       4042     4047       +5
Flag Coverage Δ
#multiple 90.4% <ø> (+0.03%) ⬆️
#single 42.17% <ø> (-0.06%) ⬇️
Impacted Files Coverage Δ
pandas/core/ops.py 96.11% <0%> (-0.37%) ⬇️
pandas/core/indexes/interval.py 94.12% <0%> (-0.19%) ⬇️
pandas/core/arrays/period.py 91.18% <0%> (-0.17%) ⬇️
pandas/core/indexes/timedeltas.py 91.39% <0%> (-0.14%) ⬇️
pandas/core/common.py 92.08% <0%> (-0.12%) ⬇️
pandas/core/indexes/datetimes.py 95.12% <0%> (-0.05%) ⬇️
pandas/core/indexes/datetimelike.py 97.34% <0%> (-0.02%) ⬇️
pandas/core/series.py 94.1% <0%> (-0.01%) ⬇️
pandas/core/dtypes/concat.py 99.18% <0%> (ø) ⬆️
pandas/tseries/frequencies.py 95.9% <0%> (ø) ⬆️
... and 28 more

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 2f2876b...e993d4d. Read the comment docs.

@elmq0022
Copy link
Contributor Author

@jreback all green.

idx._bounds


def test_append(idx):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move things like append / insert (ops that are shape shifting) to a new file, maybe test_reshape.py

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jreback would you put groupby into this category?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can leave groupby here

idx.reorder_levels, [2, 1, 0])


@pytest.mark.parametrize('ordered', [True, False])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have an astype file (you just created)

@jreback jreback added this to the 0.24.0 milestone Jul 17, 2018
idx._bounds


def test_append(idx):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can leave groupby here

@elmq0022
Copy link
Contributor Author

@jreback all green. I made the additional edits and some further cleaning as well. Thanks!

assert tm.equalContents(result, answer)
answer = idx[[0, -1]]
result = first.symmetric_difference(second)
assert tm.equalContents(result, answer)

# GH 10149
cases = [klass(second.values)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you want to come back and parameterize things like this would be great (but future PR)

@jreback jreback merged commit c9f9ee3 into pandas-dev:master Jul 24, 2018
@jreback
Copy link
Contributor

jreback commented Jul 24, 2018

thanks @elmq0022 nice cleaning!

Sup3rGeo pushed a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MultiIndex Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLN: Addtional Refactoring of MultiIndex Tests
2 participants