Skip to content

Commit 244d9a0

Browse files
committed
use tz_naive_fixture and fix top
1 parent 1405596 commit 244d9a0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pandas/tests/series/test_analytics.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -336,17 +336,15 @@ def test_describe(self):
336336
index=['count', 'unique', 'top', 'freq'])
337337
tm.assert_series_equal(result, expected)
338338

339-
@pytest.mark.parametrize("tz, name", [
340-
(None, "tz-naive"),
341-
("US/Eastern", "tz-aware")
342-
])
343-
def test_describe_dt(self, tz, name):
339+
def test_describe_with_tz(self, tz_naive_fixture):
340+
tz = tz_naive_fixture
341+
name = tz_naive_fixture
344342
start = Timestamp(2018, 1, 1)
345343
end = Timestamp(2018, 1, 5)
346344
s = Series(date_range(start, end, tz=tz), name=name)
347345
result = s.describe()
348346
expected = Series(
349-
[5, 5, start.tz_localize(tz), 1, start.tz_localize(tz),
347+
[5, 5, s.value_counts().index[0], 1, start.tz_localize(tz),
350348
end.tz_localize(tz)
351349
],
352350
name=name,

0 commit comments

Comments
 (0)