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