Skip to content

Commit

Permalink
DOC: Add docstrings to fixtures in /series/methods/test_drop_duplicat…
Browse files Browse the repository at this point in the history
…es.py (#59265)

* Add docstrings to fixtures in /series/methods/test_drop_duplicates.py

* fixup! Add docstrings to fixtures in /series/methods/test_drop_duplicates.py
  • Loading branch information
ivonastojanovic authored Jul 18, 2024
1 parent 7a4a7bf commit c3b72aa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pandas/tests/series/methods/test_drop_duplicates.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,16 @@ class TestSeriesDropDuplicates:
params=["int_", "uint", "float64", "str_", "timedelta64[h]", "datetime64[D]"]
)
def dtype(self, request):
"""
Fixture that provides different data types for testing.
"""
return request.param

@pytest.fixture
def cat_series_unused_category(self, dtype, ordered):
"""
Fixture that creates a Categorical Series with some unused categories.
"""
# Test case 1
cat_array = np.array([1, 2, 3, 4, 5], dtype=np.dtype(dtype))

Expand Down Expand Up @@ -141,7 +147,9 @@ def test_drop_duplicates_categorical_non_bool_keepfalse(

@pytest.fixture
def cat_series(self, dtype, ordered):
# no unused categories, unlike cat_series_unused_category
"""
Fixture that creates a Categorical Series with no unused categories.
"""
cat_array = np.array([1, 2, 3, 4, 5], dtype=np.dtype(dtype))

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

0 comments on commit c3b72aa

Please sign in to comment.