Skip to content

Commit a5d8c0e

Browse files
author
MomIsBestFriend
committed
Made the test to be xfailed
REF: #32011 (comment)
1 parent 216483a commit a5d8c0e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/tests/scalar/timedelta/test_arithmetic.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -377,18 +377,18 @@ def test_td_div_numeric_scalar(self):
377377
assert isinstance(result, Timedelta)
378378
assert result == Timedelta(days=2)
379379

380+
@pytest.mark.xfail(
381+
reason="Quick fix for https://github.com/pandas-dev/pandas/issues/31992"
382+
)
380383
@pytest.mark.parametrize("nan", [np.nan, np.float64("NaN"), float("nan")])
381384
def test_td_div_nan(self, nan):
382385
# np.float64('NaN') has a 'dtype' attr, avoid treating as array
383386
td = Timedelta(10, unit="d")
384387
result = td / nan
385388
assert result is NaT
386389

387-
# TODO: Don't leave commented, this is just a temporary fix for
388-
# https://github.com/pandas-dev/pandas/issues/31992
389-
390-
# result = td // nan
391-
# assert result is NaT
390+
result = td // nan
391+
assert result is NaT
392392

393393
# ---------------------------------------------------------------
394394
# Timedelta.__rdiv__

0 commit comments

Comments
 (0)