Skip to content

Commit

Permalink
Fixed test_drawdown_overlaps, by now testing properly for NaT.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ildhesten authored and richafrank committed Jul 15, 2020
1 parent ecc8308 commit 4b901f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyfolio/tests/test_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down

0 comments on commit 4b901f6

Please sign in to comment.