Skip to content

Commit 8e5b749

Browse files
mroeschkecbpygit
authored andcommitted
TST: Remove arraymanager markers (pandas-dev#56626)
1 parent c5d1e6c commit 8e5b749

35 files changed

+2
-134
lines changed

pandas/tests/copy_view/test_astype.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import pytest
55

66
from pandas.compat.pyarrow import pa_version_under12p0
7-
import pandas.util._test_decorators as td
87

98
import pandas as pd
109
from pandas import (
@@ -88,7 +87,6 @@ def test_astype_different_target_dtype(using_copy_on_write, dtype):
8887
tm.assert_frame_equal(df2, df_orig.astype(dtype))
8988

9089

91-
@td.skip_array_manager_invalid_test
9290
def test_astype_numpy_to_ea():
9391
ser = Series([1, 2, 3])
9492
with pd.option_context("mode.copy_on_write", True):

pandas/tests/copy_view/test_internals.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import numpy as np
22
import pytest
33

4-
import pandas.util._test_decorators as td
5-
64
import pandas as pd
75
from pandas import DataFrame
86
import pandas._testing as tm
97
from pandas.tests.copy_view.util import get_array
108

119

12-
@td.skip_array_manager_invalid_test
1310
def test_consolidate(using_copy_on_write):
1411
# create unconsolidated DataFrame
1512
df = DataFrame({"a": [1, 2, 3], "b": [0.1, 0.2, 0.3]})
@@ -46,7 +43,6 @@ def test_consolidate(using_copy_on_write):
4643

4744

4845
@pytest.mark.single_cpu
49-
@td.skip_array_manager_invalid_test
5046
def test_switch_options():
5147
# ensure we can switch the value of the option within one session
5248
# (assuming data is constructed after switching)
@@ -75,7 +71,6 @@ def test_switch_options():
7571
assert df.iloc[0, 0] == 0
7672

7773

78-
@td.skip_array_manager_invalid_test
7974
@pytest.mark.parametrize("dtype", [np.intp, np.int8])
8075
@pytest.mark.parametrize(
8176
"locs, arr",

pandas/tests/frame/indexing/test_indexing.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
PerformanceWarning,
1616
SettingWithCopyError,
1717
)
18-
import pandas.util._test_decorators as td
1918

2019
from pandas.core.dtypes.common import is_integer
2120

@@ -574,7 +573,6 @@ def test_getitem_setitem_integer_slice_keyerrors(self):
574573
with pytest.raises(KeyError, match=r"^3$"):
575574
df2.loc[3:11] = 0
576575

577-
@td.skip_array_manager_invalid_test # already covered in test_iloc_col_slice_view
578576
def test_fancy_getitem_slice_mixed(
579577
self, float_frame, float_string_frame, using_copy_on_write, warn_copy_on_write
580578
):
@@ -640,7 +638,6 @@ def test_getitem_fancy_scalar(self, float_frame):
640638
for idx in f.index[::5]:
641639
assert ix[idx, col] == ts[idx]
642640

643-
@td.skip_array_manager_invalid_test # TODO(ArrayManager) rewrite not using .values
644641
def test_setitem_fancy_scalar(self, float_frame):
645642
f = float_frame
646643
expected = float_frame.copy()
@@ -680,7 +677,6 @@ def test_getitem_fancy_boolean(self, float_frame):
680677
expected = f.reindex(index=f.index[boolvec], columns=["C", "D"])
681678
tm.assert_frame_equal(result, expected)
682679

683-
@td.skip_array_manager_invalid_test # TODO(ArrayManager) rewrite not using .values
684680
def test_setitem_fancy_boolean(self, float_frame):
685681
# from 2d, set with booleans
686682
frame = float_frame.copy()
@@ -1404,7 +1400,6 @@ def test_loc_setitem_rhs_frame(self, idxr, val, warn):
14041400
expected = DataFrame({"a": [np.nan, val]})
14051401
tm.assert_frame_equal(df, expected)
14061402

1407-
@td.skip_array_manager_invalid_test
14081403
def test_iloc_setitem_enlarge_no_warning(self, warn_copy_on_write):
14091404
# GH#47381
14101405
df = DataFrame(columns=["a", "b"])

pandas/tests/frame/indexing/test_setitem.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import numpy as np
44
import pytest
55

6-
import pandas.util._test_decorators as td
7-
86
from pandas.core.dtypes.base import _registry as ea_registry
97
from pandas.core.dtypes.common import is_object_dtype
108
from pandas.core.dtypes.dtypes import (
@@ -704,8 +702,6 @@ def test_setitem_ea_dtype_rhs_series(self):
704702
expected = DataFrame({"a": [1, 2]}, dtype="Int64")
705703
tm.assert_frame_equal(df, expected)
706704

707-
# TODO(ArrayManager) set column with 2d column array, see #44788
708-
@td.skip_array_manager_not_yet_implemented
709705
def test_setitem_npmatrix_2d(self):
710706
# GH#42376
711707
# for use-case df["x"] = sparse.random((10, 10)).mean(axis=1)
@@ -1063,7 +1059,6 @@ def inc(x):
10631059

10641060

10651061
class TestDataFrameSetItemBooleanMask:
1066-
@td.skip_array_manager_invalid_test # TODO(ArrayManager) rewrite not using .values
10671062
@pytest.mark.parametrize(
10681063
"mask_type",
10691064
[lambda df: df > np.abs(df) / 2, lambda df: (df > np.abs(df) / 2).values],
@@ -1307,7 +1302,6 @@ def test_setitem_not_operating_inplace(self, value, set_value, indexer):
13071302
df[indexer] = set_value
13081303
tm.assert_frame_equal(view, expected)
13091304

1310-
@td.skip_array_manager_invalid_test
13111305
def test_setitem_column_update_inplace(
13121306
self, using_copy_on_write, warn_copy_on_write
13131307
):

pandas/tests/frame/methods/test_copy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ def test_copy(self, float_frame, float_string_frame):
4646
copy = float_string_frame.copy()
4747
assert copy._mgr is not float_string_frame._mgr
4848

49-
@td.skip_array_manager_invalid_test
5049
def test_copy_consolidates(self):
5150
# GH#42477
5251
df = DataFrame(

pandas/tests/frame/methods/test_fillna.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
from pandas._config import using_pyarrow_string_dtype
55

6-
import pandas.util._test_decorators as td
7-
86
from pandas import (
97
Categorical,
108
DataFrame,
@@ -49,7 +47,6 @@ def test_fillna_dict_inplace_nonunique_columns(
4947
if not using_copy_on_write:
5048
assert tm.shares_memory(df.iloc[:, 2], orig.iloc[:, 2])
5149

52-
@td.skip_array_manager_not_yet_implemented
5350
def test_fillna_on_column_view(self, using_copy_on_write):
5451
# GH#46149 avoid unnecessary copies
5552
arr = np.full((40, 50), np.nan)
@@ -752,7 +749,6 @@ def test_fillna_inplace_with_columns_limit_and_value(self):
752749
df.fillna(axis=1, value=100, limit=1, inplace=True)
753750
tm.assert_frame_equal(df, expected)
754751

755-
@td.skip_array_manager_invalid_test
756752
@pytest.mark.parametrize("val", [-1, {"x": -1, "y": -1}])
757753
def test_inplace_dict_update_view(
758754
self, val, using_copy_on_write, warn_copy_on_write

pandas/tests/frame/methods/test_interpolate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def test_interp_string_axis(self, axis_name, axis_number):
470470

471471
@pytest.mark.parametrize("multiblock", [True, False])
472472
@pytest.mark.parametrize("method", ["ffill", "bfill", "pad"])
473-
def test_interp_fillna_methods(self, request, axis, multiblock, method):
473+
def test_interp_fillna_methods(self, axis, multiblock, method):
474474
# GH 12918
475475
df = DataFrame(
476476
{

pandas/tests/frame/methods/test_is_homogeneous_dtype.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
import numpy as np
22
import pytest
33

4-
import pandas.util._test_decorators as td
5-
64
from pandas import (
75
Categorical,
86
DataFrame,
97
)
108

11-
# _is_homogeneous_type always returns True for ArrayManager
12-
pytestmark = td.skip_array_manager_invalid_test
13-
149

1510
@pytest.mark.parametrize(
1611
"data, expected",

pandas/tests/frame/methods/test_reindex.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
is_platform_windows,
1414
)
1515
from pandas.compat.numpy import np_version_gt2
16-
import pandas.util._test_decorators as td
1716

1817
import pandas as pd
1918
from pandas import (
@@ -136,7 +135,6 @@ class TestDataFrameSelectReindex:
136135
reason="Passes int32 values to DatetimeArray in make_na_array on "
137136
"windows, 32bit linux builds",
138137
)
139-
@td.skip_array_manager_not_yet_implemented
140138
def test_reindex_tzaware_fill_value(self):
141139
# GH#52586
142140
df = DataFrame([[1]])
@@ -198,7 +196,6 @@ def test_reindex_copies_ea(self, using_copy_on_write):
198196
else:
199197
assert not np.shares_memory(result2[0].array._data, df[0].array._data)
200198

201-
@td.skip_array_manager_not_yet_implemented
202199
def test_reindex_date_fill_value(self):
203200
# passing date to dt64 is deprecated; enforced in 2.0 to cast to object
204201
arr = date_range("2016-01-01", periods=6).values.reshape(3, 2)

pandas/tests/frame/methods/test_shift.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import numpy as np
22
import pytest
33

4-
import pandas.util._test_decorators as td
5-
64
import pandas as pd
75
from pandas import (
86
CategoricalIndex,
@@ -464,7 +462,6 @@ def test_shift_axis1_multiple_blocks(self):
464462

465463
tm.assert_frame_equal(result, expected)
466464

467-
@td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) axis=1 support
468465
def test_shift_axis1_multiple_blocks_with_int_fill(self):
469466
# GH#42719
470467
rng = np.random.default_rng(2)

0 commit comments

Comments
 (0)