@@ -195,13 +195,12 @@ def test_comparison_of_ordered_categorical_with_nan_to_scalar(
195
195
196
196
cat = Categorical ([1 , 2 , 3 , None ], categories = [1 , 2 , 3 ], ordered = True )
197
197
scalar = 2
198
-
199
198
with warnings .catch_warnings ():
200
199
warnings .simplefilter ("ignore" , RuntimeWarning )
201
200
actual = getattr (cat , compare_operators_no_eq_ne )(scalar )
202
- expected = getattr (np .array (cat ), compare_operators_no_eq_ne )(scalar )
201
+ expected = getattr (np .array (cat ),
202
+ compare_operators_no_eq_ne )(scalar )
203
203
tm .assert_numpy_array_equal (actual , expected )
204
-
205
204
206
205
def test_comparison_of_ordered_categorical_with_nan_to_listlike (
207
206
self , compare_operators_no_eq_ne ):
@@ -211,13 +210,12 @@ def test_comparison_of_ordered_categorical_with_nan_to_listlike(
211
210
212
211
cat = Categorical ([1 , 2 , 3 , None ], categories = [1 , 2 , 3 ], ordered = True )
213
212
other = Categorical ([2 , 2 , 2 , 2 ], categories = [1 , 2 , 3 ], ordered = True )
214
-
215
213
with warnings .catch_warnings ():
216
214
warnings .simplefilter ("ignore" , RuntimeWarning )
217
215
actual = getattr (cat , compare_operators_no_eq_ne )(other )
218
216
expected = getattr (np .array (cat ), compare_operators_no_eq_ne )(2 )
219
217
tm .assert_numpy_array_equal (actual , expected )
220
-
218
+
221
219
@pytest .mark .parametrize ('data,reverse,base' , [
222
220
(list ("abc" ), list ("cba" ), list ("bbb" )),
223
221
([1 , 2 , 3 ], [3 , 2 , 1 ], [2 , 2 , 2 ])]
0 commit comments