Skip to content

Commit 4eff697

Browse files
committed
Add more time delta series plotting tests.
1 parent f5f32bc commit 4eff697

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pandas/tests/plotting/test_datetimelike.py

+12
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,18 @@ def test_timedelta_plot(self):
13171317
s = Series(range(5), timedelta_range('1day', periods=5))
13181318
_check_plot_works(s.plot)
13191319

1320+
# test long period
1321+
index = timedelta_range('1 day 2 hr 30 min 10 s',
1322+
periods=10, freq='1 d')
1323+
s = Series(np.random.randn(len(index)), index)
1324+
_check_plot_works(s.plot)
1325+
1326+
# test short period
1327+
index = timedelta_range('1 day 2 hr 30 min 10 s',
1328+
periods=10, freq='1 ns')
1329+
s = Series(np.random.randn(len(index)), index)
1330+
_check_plot_works(s.plot)
1331+
13201332

13211333
def _check_plot_works(f, freq=None, series=None, *args, **kwargs):
13221334
import matplotlib.pyplot as plt

0 commit comments

Comments
 (0)