Skip to content

Commit 14e07b4

Browse files
committed
TST: Add test pickling plot with DatetimeIndex
1 parent 4611140 commit 14e07b4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pandas/tests/plotting/test_datetimelike.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
""" Test cases for time series specific (freq conversion, etc) """
22

33
from datetime import datetime, timedelta, date, time
4+
import pickle
45

56
import pytest
67
from pandas.compat import lrange, zip
78

89
import numpy as np
910
from pandas import Index, Series, DataFrame, NaT
10-
from pandas.compat import is_platform_mac
11+
from pandas.compat import is_platform_mac, PY3
1112
from pandas.core.indexes.datetimes import date_range, bdate_range
1213
from pandas.core.indexes.timedeltas import timedelta_range
1314
from pandas.tseries.offsets import DateOffset
@@ -1470,5 +1471,10 @@ def _check_plot_works(f, freq=None, series=None, *args, **kwargs):
14701471

14711472
with ensure_clean(return_filelike=True) as path:
14721473
plt.savefig(path)
1474+
1475+
# GH18439
1476+
if PY3:
1477+
with ensure_clean(return_filelike=True) as path:
1478+
pickle.dump(fig, path)
14731479
finally:
14741480
plt.close(fig)

0 commit comments

Comments
 (0)