7
7
import rustapi_module .datetime as rdt
8
8
from hypothesis import given , example
9
9
from hypothesis import strategies as st
10
- from hypothesis .strategies import dates , datetimes
11
10
12
11
13
12
# Constants
@@ -78,6 +77,11 @@ def tzname(self, dt):
78
77
reason = "Date bounds were not checked in the C constructor prior to version 3.6" ,
79
78
)
80
79
80
+ xfail_macos_datetime_bounds = pytest .mark .xfail (
81
+ sys .version_info < (3 , 6 ) and platform .system () == "Darwin" ,
82
+ reason = "Unclearly failing. See https://github.com/PyO3/pyo3/pull/830 for more." ,
83
+ )
84
+
81
85
82
86
# Tests
83
87
def test_date ():
@@ -98,6 +102,7 @@ def test_invalid_date_fails():
98
102
rdt .make_date (2017 , 2 , 30 )
99
103
100
104
105
+ @xfail_macos_datetime_bounds
101
106
@given (d = st .dates (MIN_DATETIME .date (), MAX_DATETIME .date ()))
102
107
def test_date_from_timestamp (d ):
103
108
if PYPY and d < pdt .date (1900 , 1 , 1 ):
@@ -237,6 +242,7 @@ def test_datetime_typeerror():
237
242
rdt .make_datetime ("2011" , 1 , 1 , 0 , 0 , 0 , 0 )
238
243
239
244
245
+ @xfail_macos_datetime_bounds
240
246
@given (dt = st .datetimes (MIN_DATETIME , MAX_DATETIME ))
241
247
@example (dt = pdt .datetime (1970 , 1 , 2 , 0 , 0 ))
242
248
def test_datetime_from_timestamp (dt ):
0 commit comments