Skip to content

Commit d2c07a8

Browse files
oconnor663kngwyu
authored andcommitted
xfail a couple of datetime tests on Python 3.5 + macOS
1 parent 9e23476 commit d2c07a8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/rustapi_module/tests/test_datetime.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import rustapi_module.datetime as rdt
88
from hypothesis import given, example
99
from hypothesis import strategies as st
10-
from hypothesis.strategies import dates, datetimes
1110

1211

1312
# Constants
@@ -78,6 +77,11 @@ def tzname(self, dt):
7877
reason="Date bounds were not checked in the C constructor prior to version 3.6",
7978
)
8079

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+
8185

8286
# Tests
8387
def test_date():
@@ -98,6 +102,7 @@ def test_invalid_date_fails():
98102
rdt.make_date(2017, 2, 30)
99103

100104

105+
@xfail_macos_datetime_bounds
101106
@given(d=st.dates(MIN_DATETIME.date(), MAX_DATETIME.date()))
102107
def test_date_from_timestamp(d):
103108
if PYPY and d < pdt.date(1900, 1, 1):
@@ -237,6 +242,7 @@ def test_datetime_typeerror():
237242
rdt.make_datetime("2011", 1, 1, 0, 0, 0, 0)
238243

239244

245+
@xfail_macos_datetime_bounds
240246
@given(dt=st.datetimes(MIN_DATETIME, MAX_DATETIME))
241247
@example(dt=pdt.datetime(1970, 1, 2, 0, 0))
242248
def test_datetime_from_timestamp(dt):

0 commit comments

Comments
 (0)