Group :: Development/Python3
RPM: python3-module-hypothesis
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: python3-module-hypothesis-6.82.3-alt.patch
Download
Download
tests/datetime/test_dateutil_timezones.py | 6 ++++++
tests/dpcontracts/test_contracts.py | 7 +++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/tests/datetime/test_dateutil_timezones.py b/tests/datetime/test_dateutil_timezones.py
index e3afd61fb..507608ff0 100644
--- a/tests/datetime/test_dateutil_timezones.py
+++ b/tests/datetime/test_dateutil_timezones.py
@@ -79,6 +79,8 @@ def test_time_bounds_must_be_naive(name, val):
times(**{name: val}).validate()
+@pytest.mark.xfail
+# https://github.com/dateutil/dateutil/issues/1087
def test_should_have_correct_ordering():
def offset(timezone):
return abs(timezone.utcoffset(dt.datetime(2000, 1, 1)))
@@ -108,6 +110,8 @@ def test_dateutil_exists_our_not_exists_are_inverse(value):
assert datetime_does_not_exist(value) == (not tz.datetime_exists(value))
+@pytest.mark.xfail
+# https://github.com/dateutil/dateutil/issues/1087
def test_datetimes_can_exclude_imaginary():
find_any(
datetimes(**DAY_WITH_IMAGINARY_HOUR_KWARGS, allow_imaginary=True),
@@ -127,6 +131,8 @@ def test_datetimes_can_exclude_imaginary():
allow_imaginary=False,
)
)
+@pytest.mark.xfail
+# https://github.com/dateutil/dateutil/issues/1087
def test_non_imaginary_datetimes_at_boundary(val):
# This is expected to fail because Australia/Sydney is UTC+10,
# and the filter logic overflows when checking for round-trips.
diff --git a/tests/dpcontracts/test_contracts.py b/tests/dpcontracts/test_contracts.py
index 983438ad2..f96ede25d 100644
--- a/tests/dpcontracts/test_contracts.py
+++ b/tests/dpcontracts/test_contracts.py
@@ -9,7 +9,8 @@
# obtain one at https://mozilla.org/MPL/2.0/.
import pytest
-from dpcontracts import require
+
+dpcontracts = pytest.importorskip("dpcontracts")
from hypothesis import given
from hypothesis.errors import InvalidArgument
@@ -21,7 +22,9 @@ def identity(x):
return x
-@require("division is undefined for zero", lambda args: args.n != 0)
+@dpcontracts.require(
+ "division is undefined for zero", lambda args: args.n != 0
+)
def invert(n):
return 1 / n