From 4b901f6d73aa02ceb6d04b7d83502e5c6f2e81aa Mon Sep 17 00:00:00 2001 From: Ildhesten Date: Fri, 28 Feb 2020 18:30:19 +0100 Subject: [PATCH] Fixed test_drawdown_overlaps, by now testing properly for NaT. --- pyfolio/tests/test_timeseries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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([