Skip to content

Commit 42d1822

Browse files
author
Oleh Kozynets
committed
Fix CI.
1 parent 80f02d3 commit 42d1822

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

pandas/core/arrays/categorical.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1074,8 +1074,8 @@ def remove_unused_categories(self, inplace=no_default):
10741074
"""
10751075
if inplace is not no_default:
10761076
warn(
1077-
"The `inplace` parameter in pandas.Categorical.remove_unused_categories"
1078-
" is deprecated and will be removed in a future version.",
1077+
"The `inplace` parameter in pandas.Categorical.remove_unused_categories "
1078+
"is deprecated and will be removed in a future version.",
10791079
FutureWarning,
10801080
stacklevel=2,
10811081
)

pandas/tests/series/accessors/test_cat_accessor.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ def test_cat_accessor_updates_on_inplace(self):
8181
ser = Series(list("abc")).astype("category")
8282
return_value = ser.drop(0, inplace=True)
8383
assert return_value is None
84-
return_value = ser.cat.remove_unused_categories(inplace=True)
84+
85+
with tm.assert_produces_warning(FutureWarning, check_stacklevel=False):
86+
return_value = ser.cat.remove_unused_categories(inplace=True)
87+
8588
assert return_value is None
8689
assert len(ser.cat.categories) == 2
8790

0 commit comments

Comments
 (0)