Skip to content

TST: split up pandas/tests/indexing/test_multiindex.py #23912

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 22 commits into from
Nov 29, 2018

Conversation

simonjayhawkins
Copy link
Member

@simonjayhawkins simonjayhawkins commented Nov 25, 2018

only whole tests moved, tests have not been split up. this and the removal of classes is left for a follow-on PR.

@pep8speaks
Copy link

Hello @simonjayhawkins! Thanks for submitting the PR.

@gfyoung gfyoung added Refactor Internal refactoring of code MultiIndex labels Nov 25, 2018
@codecov
Copy link

codecov bot commented Nov 25, 2018

Codecov Report

Merging #23912 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #23912   +/-   ##
=======================================
  Coverage   92.31%   92.31%           
=======================================
  Files         161      161           
  Lines       51513    51513           
=======================================
  Hits        47554    47554           
  Misses       3959     3959
Flag Coverage Δ
#multiple 90.71% <ø> (ø) ⬆️
#single 42.42% <ø> (ø) ⬆️

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 43b2dab...5869d15. Read the comment docs.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

looks good, some small splitting. ping on green.

with catch_warnings(record=True):
df.ix[name, 'new_col'] = new_vals

def test_multiindex_label_slicing_with_negative_step(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

move to slicing

columns=['Test'], index=range(30, 71))
tm.assert_frame_equal(result, expected)

def test_multiindex_symmetric_difference(self):
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 to (new file set_ops)

expected = df.loc[2000, 1, 6][['A', 'B', 'C']]
tm.assert_series_equal(result, expected)

def test_get_loc_single_level(self, single_level_multiindex):
Copy link
Contributor

Choose a reason for hiding this comment

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

there are some loc tests in here

tm.assert_frame_equal(result, expected)
tm.assert_frame_equal(result, result2)

def test_getitem_setitem_slice_integers(self):
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 pure getitem tests to a new file, and pure setitem to a newfile as well, if they are both getitem & setitem, put in the setitem one

frame.loc[('bar', 'three'), 'B'] = 0
assert frame.sort_index().loc[('bar', 'three'), 'B'] == 0

def test_int_series_slicing(
Copy link
Contributor

Choose a reason for hiding this comment

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

to slicing

expected = expected.rename(('routine1', 'result1'))
tm.assert_series_equal(result, expected)

def test_mixed_depth_insert(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

insert, difference to set_ops

@jreback jreback added the Testing pandas testing functions or related to the test suite label Nov 27, 2018
@simonjayhawkins
Copy link
Member Author

@jreback green!

@jreback jreback added this to the 0.24.0 milestone Nov 29, 2018
@jreback jreback merged commit 005f44e into pandas-dev:master Nov 29, 2018
@jreback
Copy link
Contributor

jreback commented Nov 29, 2018

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MultiIndex Refactor Internal refactoring of code Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants