-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: enable test_numpy tests with ArrayManager #42780
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
Changes from all commits
79fd984
3e2f66f
a0eb54f
d6f331f
8d49d61
5366a26
c3b55d2
912b044
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,6 @@ | |
import numpy as np | ||
import pytest | ||
|
||
import pandas.util._test_decorators as td | ||
|
||
from pandas.core.dtypes.cast import can_hold_element | ||
from pandas.core.dtypes.dtypes import ( | ||
ExtensionDtype, | ||
|
@@ -30,9 +28,6 @@ | |
from pandas.core.internals import blocks | ||
from pandas.tests.extension import base | ||
|
||
# TODO(ArrayManager) PandasArray | ||
pytestmark = td.skip_array_manager_not_yet_implemented | ||
|
||
|
||
def _can_hold_element_patched(obj, element) -> bool: | ||
if isinstance(element, PandasArray): | ||
|
@@ -349,26 +344,6 @@ def test_setitem_sequence_broadcasts(self, data, box_in_series): | |
# length than the value | ||
super().test_setitem_sequence_broadcasts(data, box_in_series) | ||
|
||
@skip_nested | ||
def test_setitem_loc_scalar_mixed(self, data): | ||
# AssertionError | ||
super().test_setitem_loc_scalar_mixed(data) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where those already working? (as those are generally skipped, not only for ArrayManager) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAICT the added check in indexing.py fixed this for both AM and BM. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need a note for this? e.g. is this a user facing bug fix? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no and no |
||
|
||
@skip_nested | ||
def test_setitem_loc_scalar_multiple_homogoneous(self, data): | ||
# AssertionError | ||
super().test_setitem_loc_scalar_multiple_homogoneous(data) | ||
|
||
@skip_nested | ||
def test_setitem_iloc_scalar_mixed(self, data): | ||
# AssertionError | ||
super().test_setitem_iloc_scalar_mixed(data) | ||
|
||
@skip_nested | ||
def test_setitem_iloc_scalar_multiple_homogoneous(self, data): | ||
# AssertionError | ||
super().test_setitem_iloc_scalar_multiple_homogoneous(data) | ||
|
||
@skip_nested | ||
@pytest.mark.parametrize("setter", ["loc", None]) | ||
def test_setitem_mask_broadcast(self, data, setter): | ||
|
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.
Slightly off topic (since we already do this elsewhere), but this check is only needed for when using the patched version in the tests?
If so, I am wondering if we should use some "TEST_MODE" env variable so we can check that here and do this step only when running the patched test, to avoid the overhead this is adding for real code.
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.
yah i increasingly think that test file is more trouble than its worth. we should try to salvage the subset of tests that directly test PandasArray and disable the others