diff --git a/pyfolio/tests/test_timeseries.py b/pyfolio/tests/test_timeseries.py index 8221c45d..17327bab 100644 --- a/pyfolio/tests/test_timeseries.py +++ b/pyfolio/tests/test_timeseries.py @@ -182,7 +182,7 @@ def test_drawdown_overlaps(self): spy_drawdowns['Peak date'].shift(-1)))[:-1] self.assertGreater(len(pairs), 0) for recovery, peak in pairs: - if recovery != pd.NaT: + if not pd.isnull(recovery): self.assertLessEqual(recovery, peak) @parameterized.expand([