Skip to content

Commit 6427808

Browse files
Add docstrings to fixtures in /series/methods/test_drop_duplicates.py
1 parent 288af5f commit 6427808

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

pandas/tests/series/methods/test_drop_duplicates.py

+19-1
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,22 @@ class TestSeriesDropDuplicates:
7575
params=["int_", "uint", "float64", "str_", "timedelta64[h]", "datetime64[D]"]
7676
)
7777
def dtype(self, request):
78+
"""
79+
Fixture that provides different data types for testing.
80+
The parameterized fixture returns various numpy data types including
81+
integer, unsigned integer, float, string, timedelta, and datetime.
82+
"""
7883
return request.param
7984

8085
@pytest.fixture
8186
def cat_series_unused_category(self, dtype, ordered):
87+
"""
88+
Fixture that creates a Categorical Series with some unused categories.
89+
This fixture creates a Categorical Series based on the given dtype and
90+
ordered parameters. The input series contains some categories that are
91+
not used in the actual data, allowing the testing of categorical
92+
behavior with unused categories.
93+
"""
8294
# Test case 1
8395
cat_array = np.array([1, 2, 3, 4, 5], dtype=np.dtype(dtype))
8496

@@ -141,7 +153,13 @@ def test_drop_duplicates_categorical_non_bool_keepfalse(
141153

142154
@pytest.fixture
143155
def cat_series(self, dtype, ordered):
144-
# no unused categories, unlike cat_series_unused_category
156+
"""
157+
Fixture that creates a Categorical Series with no unused categories.
158+
This fixture creates a Categorical Series based on the given dtype and
159+
ordered parameters. The input series contains categories that are all
160+
used in the actual data, allowing the testing of categorical behavior
161+
without unused categories.
162+
"""
145163
cat_array = np.array([1, 2, 3, 4, 5], dtype=np.dtype(dtype))
146164

147165
input2 = np.array([1, 2, 3, 5, 3, 2, 4], dtype=np.dtype(dtype))

0 commit comments

Comments
 (0)