Skip to content

Commit 4d240a8

Browse files
committed
Add more time delta series plotting tests.
1 parent 0338ccb commit 4d240a8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/tests/plotting/test_datetimelike.py

+10
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,16 @@ 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 = pd.timedelta_range('1 day 2 hr 30 min 10 s', periods=10, freq='1 d')
1322+
s = pd.Series(np.random.randn(len(index)), index)
1323+
_check_plot_works(s.plot)
1324+
1325+
# test short period
1326+
index = pd.timedelta_range('1 day 2 hr 30 min 10 s', periods=10, freq='1 ns')
1327+
s = pd.Series(np.random.randn(len(index)), index)
1328+
_check_plot_works(s.plot)
1329+
13201330

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

0 commit comments

Comments
 (0)