Skip to content

Commit 892f444

Browse files
committed
Add tests for sequence of pd.Timestamp
1 parent 8bb416d commit 892f444

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
outs:
2-
- md5: 583947facaa873122f0bf18137809cd4
3-
size: 12695
2+
- md5: 0a2eae0da1e3d5b71d7392de1c081346
3+
size: 13124
44
path: test_plot_datetime.png
55
hash: md5

pygmt/tests/test_plot.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,14 @@ def test_plot_datetime():
467467
fig.plot(x=x, y=y, style="a0.2c", pen="1p")
468468

469469
# the Python built-in datetime and date
470-
x = [datetime.date(2018, 1, 1), datetime.datetime(2019, 1, 1)]
470+
x = [datetime.date(2018, 1, 1), datetime.datetime(2019, 1, 1, 0, 0, 0)]
471471
y = [8.5, 9.5]
472472
fig.plot(x=x, y=y, style="i0.2c", pen="1p")
473+
474+
# Python sequence of pd.Timestamp
475+
x = [pd.Timestamp("2018-01-01"), pd.Timestamp("2019-01-01")]
476+
y = [5.5, 6.5]
477+
fig.plot(x=x, y=y, style="d0.2c", pen="1p")
473478
return fig
474479

475480

0 commit comments

Comments
 (0)