-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: tests for setitem-like casting issues #45154
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
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.
lgtm. all comments for followon (e.g. name the tests better) :->
super().test_mask_key(obj, key, expected, val, indexer_sli) | ||
|
||
|
||
def test_20643(): |
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.
can you rename to something more informative
tm.assert_frame_equal(df, expected_df) | ||
|
||
|
||
def test_20643_comment(): |
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.
rename to better
tm.assert_series_equal(ser, expected) | ||
|
||
|
||
def test_15413(): |
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.
rename to better
tm.assert_frame_equal(df, expected) | ||
|
||
|
||
def test_37692(indexer_al): |
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.
rename
tm.assert_series_equal(ser, expected) | ||
|
||
|
||
def test_26395(indexer_al): |
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.
rename
tm.assert_frame_equal(df, expected) | ||
|
||
|
||
def test_32878_int_itemsize(): |
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.
rename
indexer_sli(ser)[0] = np.int64(1) | ||
|
||
|
||
def test_6942(indexer_al): |
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.
rename
|
||
|
||
@pytest.mark.xfail(reason="unwanted upcast") | ||
def test_15231(): |
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.
rename
I'm pretty sure a bunch of tests currently in tests.indexing.test_coercion can be ported to use the SetitemCastingEquivalents pattern, but there are some xfails ATM.
Closes a bunch of issues, implements xfailed tests for several more.
Most of the tests this adds will need to be cleaned up/parametrized. ATM im just trying to whittle down the open setitem-casting related issues