Skip to content

Commit d7fd675

Browse files
author
Chang She
committed
TST: minor change to test case for Series.describe
1 parent f108ff7 commit d7fd675

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pandas/tests/test_series.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,13 +1111,15 @@ def test_describe_objects(self):
11111111
'top' : 'a', 'freq' : 3}, index=result.index)
11121112
assert_series_equal(result, expected)
11131113

1114-
ser = Series(self.ts.index)
1114+
dt = list(self.ts.index)
1115+
dt.append(dt[0])
1116+
ser = Series(dt)
11151117
rs = ser.describe()
1116-
min_date = min(self.ts.index)
1117-
max_date = max(self.ts.index)
1118-
xp = Series({'count' : len(self.ts.index),
1118+
min_date = min(dt)
1119+
max_date = max(dt)
1120+
xp = Series({'count' : len(dt),
11191121
'unique' : len(self.ts.index),
1120-
'first' : min_date, 'last' : max_date, 'freq' : 1,
1122+
'first' : min_date, 'last' : max_date, 'freq' : 2,
11211123
'top' : min_date}, index=rs.index)
11221124
assert_series_equal(rs, xp)
11231125

0 commit comments

Comments
 (0)