Skip to content

Commit 3d2bb1c

Browse files
committed
Rename ambiguous test names
1 parent 8723f63 commit 3d2bb1c

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

pandas/tests/indexes/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def test_copy_and_deepcopy(self, indices):
343343
new_copy = indices.copy(deep=True, name="banana")
344344
assert new_copy.name == "banana"
345345

346-
def test_duplicates(self, indices):
346+
def test_has_duplicates(self, indices):
347347
if type(indices) is not self._holder:
348348
pytest.skip('Can only check if we have the correct type')
349349
if not len(indices) or isinstance(indices, MultiIndex):

pandas/tests/indexes/test_category.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,12 +590,15 @@ def test_is_unique(self, values, expected):
590590
ci = CategoricalIndex(values)
591591
assert ci.is_unique is expected
592592

593-
def test_duplicates(self):
593+
def test_has_duplicates(self):
594594

595595
idx = CategoricalIndex([0, 0, 0], name='foo')
596596
assert not idx.is_unique
597597
assert idx.has_duplicates
598598

599+
def test_drop_duplicates(self):
600+
601+
idx = CategoricalIndex([0, 0, 0], name='foo')
599602
expected = CategoricalIndex([0], name='foo')
600603
tm.assert_index_equal(idx.drop_duplicates(), expected)
601604
tm.assert_index_equal(idx.unique(), expected)

pandas/tests/indexes/test_range.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ def test_explicit_conversions(self):
806806
result = a - fidx
807807
tm.assert_index_equal(result, expected)
808808

809-
def test_duplicates(self):
809+
def test_has_duplicates(self):
810810
for ind in self.indices:
811811
if not len(ind):
812812
continue

0 commit comments

Comments
 (0)