We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c52d63 commit 9267775Copy full SHA for 9267775
pandas/tests/scalar/timedelta/test_timedelta.py
@@ -1,6 +1,5 @@
1
""" test the scalar Timedelta """
2
from datetime import timedelta
3
-from warnings import catch_warnings, simplefilter
4
5
import numpy as np
6
import pytest
@@ -310,10 +309,10 @@ def test_iso_conversion(self):
310
309
assert to_timedelta('P0DT0H0M1S') == expected
311
312
def test_nat_converters(self):
313
- with catch_warnings():
314
- simplefilter("ignore", FutureWarning)
315
-
+ with tm.assert_produces_warning(FutureWarning):
316
assert to_timedelta('nat', box=False).astype('int64') == iNaT
+
317
assert to_timedelta('nan', box=False).astype('int64') == iNaT
318
319
@pytest.mark.parametrize('units, np_unit',
0 commit comments