Skip to content

TST/CLN: clean up indexes/multi/test_unique_and_duplicates #21900

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 5 commits into from
Jul 16, 2018

Conversation

h-vetinari
Copy link
Contributor

@h-vetinari h-vetinari commented Jul 13, 2018

Splitting up #21645

  • Added tests for duplicated, including a fixture for a MultiIndex with duplicates
  • Broke up a huge test (test_duplicates) into smaller chunks
  • removed a test (test_unique_na) that was for an Index (not MultiIndex), and exists verbatim in tests/indexes/common.py
  • moved test_duplicate_level_names_access_raises to its appropriate module

@jbrockmendel
Copy link
Member

Test failure appears unrelated. Can you push again so it re-runs?

@codecov
Copy link

codecov bot commented Jul 14, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #21900      +/-   ##
==========================================
+ Coverage   91.95%   91.96%   +<.01%     
==========================================
  Files         166      166              
  Lines       50274    50323      +49     
==========================================
+ Hits        46231    46281      +50     
+ Misses       4043     4042       -1
Flag Coverage Δ
#multiple 90.36% <ø> (+0.01%) ⬆️
#single 42.23% <ø> (+0.06%) ⬆️
Impacted Files Coverage Δ
pandas/core/indexes/timedeltas.py 91.53% <0%> (-0.65%) ⬇️
pandas/core/indexes/base.py 96.35% <0%> (-0.18%) ⬇️
pandas/core/indexes/datetimes.py 95.16% <0%> (-0.18%) ⬇️
pandas/core/dtypes/inference.py 98.41% <0%> (ø) ⬆️
pandas/core/arrays/timedelta.py
pandas/core/arrays/timedeltas.py 89.84% <0%> (ø)
pandas/core/indexing.py 93.73% <0%> (ø) ⬆️
pandas/core/arrays/datetimelike.py 94.06% <0%> (+0.38%) ⬆️
pandas/core/indexes/datetimelike.py 97.35% <0%> (+0.41%) ⬆️
pandas/core/arrays/datetimes.py 96.12% <0%> (+0.67%) ⬆️

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 610a19a...fce0d56. Read the comment docs.

@h-vetinari
Copy link
Contributor Author

@jbrockmendel All green :)



def test_duplicate_level_names_access_raises(idx):
idx.names = ['foo', 'foo']
Copy link
Contributor

Choose a reason for hiding this comment

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

is there an issue number asssociated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't know, just moving tests around

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Came from #19029 through #21423

from pandas.compat import range, u


@pytest.fixture
Copy link
Contributor

Choose a reason for hiding this comment

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

should go in the conftest.py

@jreback jreback added Testing pandas testing functions or related to the test suite MultiIndex labels Jul 14, 2018
@jreback jreback added this to the 0.24.0 milestone Jul 14, 2018
@jreback jreback merged commit 272bbdc into pandas-dev:master Jul 16, 2018
@jreback
Copy link
Contributor

jreback commented Jul 16, 2018

thanks @h-vetinari

@h-vetinari h-vetinari deleted the tst_mi_unique branch July 17, 2018 07:18
aeltanawy pushed a commit to aeltanawy/pandas that referenced this pull request Jul 20, 2018
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.

3 participants