@@ -72,11 +72,7 @@ def data_for_grouping():
72
72
return Categorical (["a" , "a" , None , None , "b" , "b" , "a" , "c" ])
73
73
74
74
75
- class TestDtype (base .BaseDtypeTests ):
76
- pass
77
-
78
-
79
- class TestInterface (base .BaseInterfaceTests ):
75
+ class TestCategorical (base .ExtensionTests ):
80
76
@pytest .mark .xfail (reason = "Memory usage doesn't match" )
81
77
def test_memory_usage (self , data ):
82
78
# TODO: Is this deliberate?
@@ -106,8 +102,6 @@ def test_contains(self, data, data_missing):
106
102
assert na_value_obj not in data
107
103
assert na_value_obj in data_missing # this line differs from super method
108
104
109
-
110
- class TestConstructors (base .BaseConstructorsTests ):
111
105
def test_empty (self , dtype ):
112
106
cls = dtype .construct_array_type ()
113
107
result = cls ._empty ((4 ,), dtype = dtype )
@@ -117,41 +111,13 @@ def test_empty(self, dtype):
117
111
# dtype on our result.
118
112
assert result .dtype == CategoricalDtype ([])
119
113
120
-
121
- class TestReshaping (base .BaseReshapingTests ):
122
- pass
123
-
124
-
125
- class TestGetitem (base .BaseGetitemTests ):
126
114
@pytest .mark .skip (reason = "Backwards compatibility" )
127
115
def test_getitem_scalar (self , data ):
128
116
# CategoricalDtype.type isn't "correct" since it should
129
117
# be a parent of the elements (object). But don't want
130
118
# to break things by changing.
131
119
super ().test_getitem_scalar (data )
132
120
133
-
134
- class TestSetitem (base .BaseSetitemTests ):
135
- pass
136
-
137
-
138
- class TestIndex (base .BaseIndexTests ):
139
- pass
140
-
141
-
142
- class TestMissing (base .BaseMissingTests ):
143
- pass
144
-
145
-
146
- class TestReduce (base .BaseReduceTests ):
147
- pass
148
-
149
-
150
- class TestAccumulate (base .BaseAccumulateTests ):
151
- pass
152
-
153
-
154
- class TestMethods (base .BaseMethodsTests ):
155
121
@pytest .mark .xfail (reason = "Unobserved categories included" )
156
122
def test_value_counts (self , all_data , dropna ):
157
123
return super ().test_value_counts (all_data , dropna )
@@ -178,12 +144,6 @@ def test_map(self, data, na_action):
178
144
result = data .map (lambda x : x , na_action = na_action )
179
145
tm .assert_extension_array_equal (result , data )
180
146
181
-
182
- class TestCasting (base .BaseCastingTests ):
183
- pass
184
-
185
-
186
- class TestArithmeticOps (base .BaseArithmeticOpsTests ):
187
147
def test_arith_frame_with_scalar (self , data , all_arithmetic_operators , request ):
188
148
# frame & scalar
189
149
op_name = all_arithmetic_operators
@@ -205,8 +165,6 @@ def test_arith_series_with_scalar(self, data, all_arithmetic_operators, request)
205
165
)
206
166
super ().test_arith_series_with_scalar (data , op_name )
207
167
208
-
209
- class TestComparisonOps (base .BaseComparisonOpsTests ):
210
168
def _compare_other (self , s , data , op , other ):
211
169
op_name = f"__{ op .__name__ } __"
212
170
if op_name not in ["__eq__" , "__ne__" ]:
@@ -216,9 +174,21 @@ def _compare_other(self, s, data, op, other):
216
174
else :
217
175
return super ()._compare_other (s , data , op , other )
218
176
219
-
220
- class TestParsing (base .BaseParsingTests ):
221
- pass
177
+ @pytest .mark .xfail (reason = "Categorical overrides __repr__" )
178
+ @pytest .mark .parametrize ("size" , ["big" , "small" ])
179
+ def test_array_repr (self , data , size ):
180
+ super ().test_array_repr (data , size )
181
+
182
+ @pytest .mark .xfail (
183
+ reason = "Looks like the test (incorrectly) implicitly assumes int/bool dtype"
184
+ )
185
+ def test_invert (self , data ):
186
+ super ().test_invert (data )
187
+
188
+ @pytest .mark .xfail (reason = "TBD" )
189
+ @pytest .mark .parametrize ("as_index" , [True , False ])
190
+ def test_groupby_extension_agg (self , as_index , data_for_grouping ):
191
+ super ().test_groupby_extension_agg (as_index , data_for_grouping )
222
192
223
193
224
194
class Test2DCompat (base .NDArrayBacked2DTests ):
0 commit comments