Skip to content

Commit 5e74906

Browse files
committed
revert
1 parent 7689999 commit 5e74906

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pandas/tests/util/test_hashing.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -243,14 +243,14 @@ def test_categorical_consistency(s1, categorize):
243243
tm.assert_series_equal(h1, h3)
244244

245245

246-
def test_categorical_with_nan_consistency(unit):
247-
dti = pd.date_range("2012-01-01", periods=5, name="B", unit=unit)
248-
cat = pd.Categorical.from_codes([-1, 0, 1, 2, 3, 4], categories=dti)
249-
expected = hash_array(cat, categorize=False)
250-
251-
ts = pd.Timestamp("2012-01-01").as_unit(unit)
252-
cat2 = pd.Categorical.from_codes([-1, 0], categories=[ts])
253-
result = hash_array(cat2, categorize=False)
246+
def test_categorical_with_nan_consistency():
247+
c = pd.Categorical.from_codes(
248+
[-1, 0, 1, 2, 3, 4], categories=pd.date_range("2012-01-01", periods=5, name="B")
249+
)
250+
expected = hash_array(c, categorize=False)
251+
252+
c = pd.Categorical.from_codes([-1, 0], categories=[pd.Timestamp("2012-01-01")])
253+
result = hash_array(c, categorize=False)
254254

255255
assert result[0] in expected
256256
assert result[1] in expected

0 commit comments

Comments
 (0)