diff --git a/pandas/tests/plotting/test_datetimelike.py b/pandas/tests/plotting/test_datetimelike.py index 1d6c8dc404d2b..7a28f05514dd5 100644 --- a/pandas/tests/plotting/test_datetimelike.py +++ b/pandas/tests/plotting/test_datetimelike.py @@ -1,5 +1,5 @@ """ Test cases for time series specific (freq conversion, etc) """ - +import sys from datetime import datetime, timedelta, date, time import pickle @@ -1557,7 +1557,10 @@ def _check_plot_works(f, freq=None, series=None, *args, **kwargs): # GH18439 # this is supported only in Python 3 pickle since # pickle in Python2 doesn't support instancemethod pickling - if PY3: + # TODO(statsmodels 0.10.0): Remove the statsmodels check + # https://github.com/pandas-dev/pandas/issues/24088 + # https://github.com/statsmodels/statsmodels/issues/4772 + if PY3 and 'statsmodels' not in sys.modules: with ensure_clean(return_filelike=True) as path: pickle.dump(fig, path) finally: