Skip to content

Commit c80c2dc

Browse files
Update test_operators.py
1 parent 2fc1d27 commit c80c2dc

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pandas/tests/arrays/categorical/test_operators.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,12 @@ def test_comparison_of_ordered_categorical_with_nan_to_scalar(
195195

196196
cat = Categorical([1, 2, 3, None], categories=[1, 2, 3], ordered=True)
197197
scalar = 2
198-
199198
with warnings.catch_warnings():
200199
warnings.simplefilter("ignore", RuntimeWarning)
201200
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)
203203
tm.assert_numpy_array_equal(actual, expected)
204-
205204

206205
def test_comparison_of_ordered_categorical_with_nan_to_listlike(
207206
self, compare_operators_no_eq_ne):
@@ -211,13 +210,12 @@ def test_comparison_of_ordered_categorical_with_nan_to_listlike(
211210

212211
cat = Categorical([1, 2, 3, None], categories=[1, 2, 3], ordered=True)
213212
other = Categorical([2, 2, 2, 2], categories=[1, 2, 3], ordered=True)
214-
215213
with warnings.catch_warnings():
216214
warnings.simplefilter("ignore", RuntimeWarning)
217215
actual = getattr(cat, compare_operators_no_eq_ne)(other)
218216
expected = getattr(np.array(cat), compare_operators_no_eq_ne)(2)
219217
tm.assert_numpy_array_equal(actual, expected)
220-
218+
221219
@pytest.mark.parametrize('data,reverse,base', [
222220
(list("abc"), list("cba"), list("bbb")),
223221
([1, 2, 3], [3, 2, 1], [2, 2, 2])]

0 commit comments

Comments
 (0)