From 68c0b6b3b005c7adcba7e20d0c6b6712345f37fc Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 26 Nov 2026 12:17:29 +0300 Subject: [PATCH 1/2] gh-162671: Support selecting hypothesis tests by label --- Lib/test/support/hypothesis_helper.py | 6 ++++++ Lib/test/test_base64.py | 12 +++++++++++- Lib/test/test_binascii.py | 12 +++++++++++- Lib/test/test_math_property.py | 4 +++- Lib/test/test_tools/test_makeunicodedata.py | 3 ++- Lib/test/test_zoneinfo/test_zoneinfo_property.py | 16 +++++++++++++++- 6 files changed, 48 insertions(+), 5 deletions(-) diff --git a/Lib/test/support/hypothesis_helper.py b/Lib/test/support/hypothesis_helper.py index 6249ba43f06716a..7dc65091bec45c6 100644 --- a/Lib/test/support/hypothesis_helper.py +++ b/Lib/test/support/hypothesis_helper.py @@ -55,3 +55,9 @@ ), ) hypothesis.settings.load_profile("cpython-local-dev") + + +def mark_hypothesis(func): + from test.support import mark + + return mark("hypothesis")(func) diff --git a/Lib/test/test_base64.py b/Lib/test/test_base64.py index 868abcfee24e101..e7da3f76ea92548 100644 --- a/Lib/test/test_base64.py +++ b/Lib/test/test_base64.py @@ -16,7 +16,7 @@ class LazyImportTest(unittest.TestCase): def test_lazy_import(self): ensure_lazy_imports("base64", {"re", "getopt"}) -from test.support.hypothesis_helper import hypothesis +from test.support.hypothesis_helper import hypothesis, mark_hypothesis class LegacyBase64TestCase(unittest.TestCase): @@ -74,6 +74,7 @@ def test_decodebytes(self): @hypothesis.given(payload=hypothesis.strategies.binary()) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz') + @mark_hypothesis def test_bytes_encode_decode_round_trip(self, payload): encoded = base64.encodebytes(payload) decoded = base64.decodebytes(encoded) @@ -109,6 +110,7 @@ def test_decode(self): @hypothesis.given(payload=hypothesis.strategies.binary()) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz') + @mark_hypothesis def test_legacy_encode_decode_round_trip(self, payload): from io import BytesIO payload_file_r = BytesIO(payload) @@ -503,6 +505,7 @@ def _altchars_strategy(): validate=hypothesis.strategies.booleans()) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz', b"_-", True) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz', b"_-", False) + @mark_hypothesis def test_b64_encode_decode_round_trip(self, payload, altchars, validate): encoded = base64.b64encode(payload, altchars=altchars) decoded = base64.b64decode(encoded, altchars=altchars, @@ -511,6 +514,7 @@ def test_b64_encode_decode_round_trip(self, payload, altchars, validate): @hypothesis.given(payload=hypothesis.strategies.binary()) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz') + @mark_hypothesis def test_standard_b64_encode_decode_round_trip(self, payload): encoded = base64.standard_b64encode(payload) decoded = base64.standard_b64decode(encoded) @@ -518,6 +522,7 @@ def test_standard_b64_encode_decode_round_trip(self, payload): @hypothesis.given(payload=hypothesis.strategies.binary()) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz') + @mark_hypothesis def test_urlsafe_b64_encode_decode_round_trip(self, payload): encoded = base64.urlsafe_b64encode(payload) decoded = base64.urlsafe_b64decode(encoded) @@ -701,6 +706,7 @@ def test_b32decode_error(self): | hypothesis.strategies.binary(min_size=1, max_size=1))) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz', True, None) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz', False, None) + @mark_hypothesis def test_b32_encode_decode_round_trip(self, payload, casefold, map01): encoded = base64.b32encode(payload) decoded = base64.b32decode(encoded, casefold=casefold, map01=map01) @@ -837,6 +843,7 @@ def test_b32hexdecode_error(self): casefold=hypothesis.strategies.booleans()) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz', True) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz', False) + @mark_hypothesis def test_b32_hexencode_decode_round_trip(self, payload, casefold): encoded = base64.b32hexencode(payload) decoded = base64.b32hexdecode(encoded, casefold=casefold) @@ -899,6 +906,7 @@ def test_b16decode_ignorechars(self): casefold=hypothesis.strategies.booleans()) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz', True) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz', False) + @mark_hypothesis def test_b16_encode_decode_round_trip(self, payload, casefold): endoded = base64.b16encode(payload) decoded = base64.b16decode(endoded, casefold=casefold) @@ -1321,6 +1329,7 @@ def add_padding(self, payload): @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz', False, 20, True, True) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz', True, 0, False, True) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz', True, 20, True, False) + @mark_hypothesis def test_a85_encode_decode_round_trip( self, payload, foldspaces, wrapcol, pad, adobe ): @@ -1349,6 +1358,7 @@ def test_a85_encode_decode_round_trip( pad=hypothesis.strategies.booleans()) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz', True) @hypothesis.example(b'abcdefghijklmnopqrstuvwxyz', False) + @mark_hypothesis def test_b85_encode_decode_round_trip(self, payload, pad): encoded = base64.b85encode(payload, pad=pad) if pad: diff --git a/Lib/test/test_binascii.py b/Lib/test/test_binascii.py index 77ea77ed37bdc59..94b1abd4079efd1 100644 --- a/Lib/test/test_binascii.py +++ b/Lib/test/test_binascii.py @@ -6,7 +6,7 @@ import re import sys from test.support import bigmemtest, _1G, _4G, check_impl_detail -from test.support.hypothesis_helper import hypothesis +from test.support.hypothesis_helper import hypothesis, mark_hypothesis # Note: "*_hex" functions are aliases for "(un)hexlify" @@ -420,6 +420,7 @@ def test_base64_canonical(self): @hypothesis.example(b'\x00') @hypothesis.example(b'\xff\xff') @hypothesis.example(b'abc') + @mark_hypothesis def test_base64_canonical_roundtrip(self, payload): # The encoder must always produce canonical output. encoded = binascii.b2a_base64(payload, newline=False) @@ -866,6 +867,7 @@ def test_base85_canonical(self): @hypothesis.example(b'\x00') @hypothesis.example(b'\xff\xff') @hypothesis.example(b'abc') + @mark_hypothesis def test_base85_canonical_roundtrip(self, payload): encoded = binascii.b2a_base85(payload) decoded = binascii.a2b_base85(encoded, canonical=True) @@ -875,6 +877,7 @@ def test_base85_canonical_roundtrip(self, payload): @hypothesis.example(b'\x00') @hypothesis.example(b'\xff') @hypothesis.example(b'ab\x00') + @mark_hypothesis def test_base85_canonical_unique(self, payload): # For a partial group, sweeping all 85 last-digit values should # yield exactly one encoding that both decodes to the original @@ -953,6 +956,7 @@ def test_ascii85_canonical(self): @hypothesis.example(b'\x00\x00\x00\x00') # triggers z abbreviation @hypothesis.example(b'\xff\xff') @hypothesis.example(b'abc') + @mark_hypothesis def test_ascii85_canonical_roundtrip(self, payload): encoded = binascii.b2a_ascii85(payload) decoded = binascii.a2b_ascii85(encoded, canonical=True) @@ -962,6 +966,7 @@ def test_ascii85_canonical_roundtrip(self, payload): @hypothesis.example(b'\x00') @hypothesis.example(b'\xff') @hypothesis.example(b'ab\x00') + @mark_hypothesis def test_ascii85_canonical_unique(self, payload): hypothesis.assume(len(payload) % 4 != 0) canonical_enc = binascii.b2a_ascii85(payload) @@ -1189,6 +1194,7 @@ def test_base32_canonical(self): @hypothesis.example(b'\x00') @hypothesis.example(b'\xff\xff') @hypothesis.example(b'abc') + @mark_hypothesis def test_base32_canonical_roundtrip(self, payload): encoded = binascii.b2a_base32(payload) decoded = binascii.a2b_base32(encoded, canonical=True) @@ -1331,6 +1337,7 @@ def test_uu(self): binary=hypothesis.strategies.binary(max_size=45), backtick=hypothesis.strategies.booleans(), ) + @mark_hypothesis def test_b2a_roundtrip(self, binary, backtick): converted = binascii.b2a_uu(self.type2test(binary), backtick=backtick) restored = binascii.a2b_uu(self.type2test(converted)) @@ -1374,6 +1381,7 @@ def test_hex(self): self.assertEqual(binascii.unhexlify(self.type2test(t)), u) @hypothesis.given(binary=hypothesis.strategies.binary()) + @mark_hypothesis def test_hex_roundtrip(self, binary): converted = binascii.hexlify(self.type2test(binary)) restored = binascii.unhexlify(self.type2test(converted)) @@ -1527,6 +1535,7 @@ def test_qp(self): istext=hypothesis.strategies.booleans(), header=hypothesis.strategies.booleans(), ) + @mark_hypothesis def test_b2a_qp_a2b_qp_round_trip(self, binary, quotetabs, istext, header): converted = binascii.b2a_qp( self.type2test(binary), @@ -1624,6 +1633,7 @@ def test_b2a_base64_wrapcol(self): binary=hypothesis.strategies.binary(), newline=hypothesis.strategies.booleans(), ) + @mark_hypothesis def test_base64_roundtrip(self, binary, newline): converted = binascii.b2a_base64(self.type2test(binary), newline=newline) restored = binascii.a2b_base64(self.type2test(converted)) diff --git a/Lib/test/test_math_property.py b/Lib/test/test_math_property.py index 7d51aa17b4cc270..0e57f3dde354fe9 100644 --- a/Lib/test/test_math_property.py +++ b/Lib/test/test_math_property.py @@ -2,7 +2,7 @@ import unittest from math import isnan, nextafter from test.support import requires_IEEE_754 -from test.support.hypothesis_helper import hypothesis +from test.support.hypothesis_helper import hypothesis, mark_hypothesis floats = hypothesis.strategies.floats integers = hypothesis.strategies.integers @@ -22,6 +22,7 @@ class NextafterTests(unittest.TestCase): x=floats(), y=floats(), steps=integers(min_value=0, max_value=2**16)) + @mark_hypothesis def test_count(self, x, y, steps): assert_equal_float(via_reduce(x, y, steps), nextafter(x, y, steps=steps)) @@ -32,6 +33,7 @@ def test_count(self, x, y, steps): y=floats(), a=integers(min_value=0), b=integers(min_value=0)) + @mark_hypothesis def test_addition_commutes(self, x, y, a, b): first = nextafter(x, y, steps=a) second = nextafter(first, y, steps=b) diff --git a/Lib/test/test_tools/test_makeunicodedata.py b/Lib/test/test_tools/test_makeunicodedata.py index f31375117e2e926..3f34584239d70c0 100644 --- a/Lib/test/test_tools/test_makeunicodedata.py +++ b/Lib/test/test_tools/test_makeunicodedata.py @@ -1,7 +1,7 @@ import unittest from test.test_tools import skip_if_missing, imports_under_tool from test import support -from test.support.hypothesis_helper import hypothesis +from test.support.hypothesis_helper import hypothesis, mark_hypothesis st = hypothesis.strategies given = hypothesis.given @@ -115,6 +115,7 @@ def test_forbid_empty_dawg(self): ("ab", "1"), ] ) + @mark_hypothesis def test_dawg(self, data): # suppress debug prints with support.captured_stdout() as output: diff --git a/Lib/test/test_zoneinfo/test_zoneinfo_property.py b/Lib/test/test_zoneinfo/test_zoneinfo_property.py index c00815e2fd4c364..260fa49352cc42a 100644 --- a/Lib/test/test_zoneinfo/test_zoneinfo_property.py +++ b/Lib/test/test_zoneinfo/test_zoneinfo_property.py @@ -5,7 +5,7 @@ import unittest import zoneinfo -from test.support.hypothesis_helper import hypothesis +from test.support.hypothesis_helper import hypothesis, mark_hypothesis import test.test_zoneinfo._support as test_support @@ -96,12 +96,14 @@ class ZoneInfoTest(ZoneInfoTestBase): @hypothesis.given(key=valid_keys()) @add_key_examples + @mark_hypothesis def test_str(self, key): zi = self.klass(key) self.assertEqual(str(zi), key) @hypothesis.given(key=valid_keys()) @add_key_examples + @mark_hypothesis def test_key(self, key): zi = self.klass(key) @@ -119,6 +121,7 @@ def test_key(self, key): @hypothesis.example(dt=datetime.time(0)) @hypothesis.example(dt=datetime.time(12, 0)) @hypothesis.example(dt=datetime.time(23, 59, 59, 999999)) + @mark_hypothesis def test_utc(self, dt): zi = self.klass("UTC") dt_zi = dt.replace(tzinfo=zi) @@ -144,6 +147,7 @@ def setUp(self): @hypothesis.given(key=valid_keys()) @add_key_examples + @mark_hypothesis def test_pickle_unpickle_cache(self, key): zi = self.klass(key) for proto in range(pickle.HIGHEST_PROTOCOL + 1): @@ -154,6 +158,7 @@ def test_pickle_unpickle_cache(self, key): @hypothesis.given(key=valid_keys()) @add_key_examples + @mark_hypothesis def test_pickle_unpickle_no_cache(self, key): zi = self.klass.no_cache(key) for proto in range(pickle.HIGHEST_PROTOCOL + 1): @@ -165,6 +170,7 @@ def test_pickle_unpickle_no_cache(self, key): @hypothesis.given(key=valid_keys()) @add_key_examples + @mark_hypothesis def test_pickle_unpickle_cache_multiple_rounds(self, key): """Test that pickle/unpickle is idempotent.""" zi_0 = self.klass(key) @@ -183,6 +189,7 @@ def test_pickle_unpickle_cache_multiple_rounds(self, key): @hypothesis.given(key=valid_keys()) @add_key_examples + @mark_hypothesis def test_pickle_unpickle_no_cache_multiple_rounds(self, key): """Test that pickle/unpickle is idempotent.""" zi_cache = self.klass(key) @@ -215,6 +222,7 @@ class ZoneInfoCacheTest(ZoneInfoTestBase): @hypothesis.given(key=valid_keys()) @add_key_examples + @mark_hypothesis def test_cache(self, key): zi_0 = self.klass(key) zi_1 = self.klass(key) @@ -223,6 +231,7 @@ def test_cache(self, key): @hypothesis.given(key=valid_keys()) @add_key_examples + @mark_hypothesis def test_no_cache(self, key): zi_0 = self.klass.no_cache(key) zi_1 = self.klass.no_cache(key) @@ -246,6 +255,7 @@ def _is_ambiguous(self, dt): @hypothesis.example(dt=datetime.datetime(1970, 1, 1), key="America/New_York") @hypothesis.example(dt=datetime.datetime(2020, 1, 1), key="Europe/Paris") @hypothesis.example(dt=datetime.datetime(2020, 6, 1), key="Europe/Paris") + @mark_hypothesis def test_same_str(self, dt, key): py_dt = dt.replace(tzinfo=py_zoneinfo.ZoneInfo(key)) c_dt = dt.replace(tzinfo=c_zoneinfo.ZoneInfo(key)) @@ -261,6 +271,7 @@ def test_same_str(self, dt, key): @hypothesis.example(dt=datetime.datetime(2040, 1, 1), key="Europe/Paris") @hypothesis.example(dt=datetime.datetime.min, key="Asia/Tokyo") @hypothesis.example(dt=datetime.datetime.max, key="Asia/Tokyo") + @mark_hypothesis def test_same_offsets_and_names(self, dt, key): py_dt = dt.replace(tzinfo=py_zoneinfo.ZoneInfo(key)) c_dt = dt.replace(tzinfo=c_zoneinfo.ZoneInfo(key)) @@ -281,6 +292,7 @@ def test_same_offsets_and_names(self, dt, key): dt=datetime.datetime(2006, 10, 29, 5, 15, tzinfo=UTC), key="America/New_York", ) + @mark_hypothesis def test_same_from_utc(self, dt, key): py_zi = py_zoneinfo.ZoneInfo(key) c_zi = c_zoneinfo.ZoneInfo(key) @@ -322,6 +334,7 @@ def test_same_from_utc(self, dt, key): @hypothesis.example(dt=datetime.datetime.min, key="America/New_York") @hypothesis.example(dt=datetime.datetime.min, key="Asia/Tokyo") @hypothesis.example(dt=datetime.datetime.max, key="Asia/Tokyo") + @mark_hypothesis def test_same_to_utc(self, dt, key): py_dt = dt.replace(tzinfo=py_zoneinfo.ZoneInfo(key)) c_dt = dt.replace(tzinfo=c_zoneinfo.ZoneInfo(key)) @@ -349,6 +362,7 @@ def test_same_to_utc(self, dt, key): @hypothesis.given(key=valid_keys()) @add_key_examples + @mark_hypothesis def test_cross_module_pickle(self, key): py_zi = py_zoneinfo.ZoneInfo(key) c_zi = c_zoneinfo.ZoneInfo(key) From 9550dbcfa1b7b7d9ba7b7441dc8110c8ce0158f6 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 26 Nov 2026 17:50:51 +0300 Subject: [PATCH 2/2] Address review --- Lib/test/support/hypothesis_helper.py | 8 +++----- Lib/test/test_math_property.py | 8 ++++---- .../test_zoneinfo/test_zoneinfo_property.py | 19 ++++--------------- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/Lib/test/support/hypothesis_helper.py b/Lib/test/support/hypothesis_helper.py index 7dc65091bec45c6..769d031cfcce15b 100644 --- a/Lib/test/support/hypothesis_helper.py +++ b/Lib/test/support/hypothesis_helper.py @@ -1,5 +1,7 @@ import os +from test.support import mark + try: import hypothesis except ImportError: @@ -56,8 +58,4 @@ ) hypothesis.settings.load_profile("cpython-local-dev") - -def mark_hypothesis(func): - from test.support import mark - - return mark("hypothesis")(func) +mark_hypothesis = mark("hypothesis") diff --git a/Lib/test/test_math_property.py b/Lib/test/test_math_property.py index 0e57f3dde354fe9..a4b901fb4d4f359 100644 --- a/Lib/test/test_math_property.py +++ b/Lib/test/test_math_property.py @@ -1,8 +1,10 @@ import functools import unittest from math import isnan, nextafter -from test.support import requires_IEEE_754 -from test.support.hypothesis_helper import hypothesis, mark_hypothesis +from test.support import requires_IEEE_754, mark_module +from test.support.hypothesis_helper import hypothesis + +mark_module('hypothesis') floats = hypothesis.strategies.floats integers = hypothesis.strategies.integers @@ -22,7 +24,6 @@ class NextafterTests(unittest.TestCase): x=floats(), y=floats(), steps=integers(min_value=0, max_value=2**16)) - @mark_hypothesis def test_count(self, x, y, steps): assert_equal_float(via_reduce(x, y, steps), nextafter(x, y, steps=steps)) @@ -33,7 +34,6 @@ def test_count(self, x, y, steps): y=floats(), a=integers(min_value=0), b=integers(min_value=0)) - @mark_hypothesis def test_addition_commutes(self, x, y, a, b): first = nextafter(x, y, steps=a) second = nextafter(first, y, steps=b) diff --git a/Lib/test/test_zoneinfo/test_zoneinfo_property.py b/Lib/test/test_zoneinfo/test_zoneinfo_property.py index 260fa49352cc42a..78bb8098bb56ba1 100644 --- a/Lib/test/test_zoneinfo/test_zoneinfo_property.py +++ b/Lib/test/test_zoneinfo/test_zoneinfo_property.py @@ -5,10 +5,13 @@ import unittest import zoneinfo -from test.support.hypothesis_helper import hypothesis, mark_hypothesis +from test.support import mark_module +from test.support.hypothesis_helper import hypothesis import test.test_zoneinfo._support as test_support +mark_module('hypothesis') + ZoneInfoTestBase = test_support.ZoneInfoTestBase py_zoneinfo, c_zoneinfo = test_support.get_modules() @@ -96,14 +99,12 @@ class ZoneInfoTest(ZoneInfoTestBase): @hypothesis.given(key=valid_keys()) @add_key_examples - @mark_hypothesis def test_str(self, key): zi = self.klass(key) self.assertEqual(str(zi), key) @hypothesis.given(key=valid_keys()) @add_key_examples - @mark_hypothesis def test_key(self, key): zi = self.klass(key) @@ -121,7 +122,6 @@ def test_key(self, key): @hypothesis.example(dt=datetime.time(0)) @hypothesis.example(dt=datetime.time(12, 0)) @hypothesis.example(dt=datetime.time(23, 59, 59, 999999)) - @mark_hypothesis def test_utc(self, dt): zi = self.klass("UTC") dt_zi = dt.replace(tzinfo=zi) @@ -147,7 +147,6 @@ def setUp(self): @hypothesis.given(key=valid_keys()) @add_key_examples - @mark_hypothesis def test_pickle_unpickle_cache(self, key): zi = self.klass(key) for proto in range(pickle.HIGHEST_PROTOCOL + 1): @@ -158,7 +157,6 @@ def test_pickle_unpickle_cache(self, key): @hypothesis.given(key=valid_keys()) @add_key_examples - @mark_hypothesis def test_pickle_unpickle_no_cache(self, key): zi = self.klass.no_cache(key) for proto in range(pickle.HIGHEST_PROTOCOL + 1): @@ -170,7 +168,6 @@ def test_pickle_unpickle_no_cache(self, key): @hypothesis.given(key=valid_keys()) @add_key_examples - @mark_hypothesis def test_pickle_unpickle_cache_multiple_rounds(self, key): """Test that pickle/unpickle is idempotent.""" zi_0 = self.klass(key) @@ -189,7 +186,6 @@ def test_pickle_unpickle_cache_multiple_rounds(self, key): @hypothesis.given(key=valid_keys()) @add_key_examples - @mark_hypothesis def test_pickle_unpickle_no_cache_multiple_rounds(self, key): """Test that pickle/unpickle is idempotent.""" zi_cache = self.klass(key) @@ -222,7 +218,6 @@ class ZoneInfoCacheTest(ZoneInfoTestBase): @hypothesis.given(key=valid_keys()) @add_key_examples - @mark_hypothesis def test_cache(self, key): zi_0 = self.klass(key) zi_1 = self.klass(key) @@ -231,7 +226,6 @@ def test_cache(self, key): @hypothesis.given(key=valid_keys()) @add_key_examples - @mark_hypothesis def test_no_cache(self, key): zi_0 = self.klass.no_cache(key) zi_1 = self.klass.no_cache(key) @@ -255,7 +249,6 @@ def _is_ambiguous(self, dt): @hypothesis.example(dt=datetime.datetime(1970, 1, 1), key="America/New_York") @hypothesis.example(dt=datetime.datetime(2020, 1, 1), key="Europe/Paris") @hypothesis.example(dt=datetime.datetime(2020, 6, 1), key="Europe/Paris") - @mark_hypothesis def test_same_str(self, dt, key): py_dt = dt.replace(tzinfo=py_zoneinfo.ZoneInfo(key)) c_dt = dt.replace(tzinfo=c_zoneinfo.ZoneInfo(key)) @@ -271,7 +264,6 @@ def test_same_str(self, dt, key): @hypothesis.example(dt=datetime.datetime(2040, 1, 1), key="Europe/Paris") @hypothesis.example(dt=datetime.datetime.min, key="Asia/Tokyo") @hypothesis.example(dt=datetime.datetime.max, key="Asia/Tokyo") - @mark_hypothesis def test_same_offsets_and_names(self, dt, key): py_dt = dt.replace(tzinfo=py_zoneinfo.ZoneInfo(key)) c_dt = dt.replace(tzinfo=c_zoneinfo.ZoneInfo(key)) @@ -292,7 +284,6 @@ def test_same_offsets_and_names(self, dt, key): dt=datetime.datetime(2006, 10, 29, 5, 15, tzinfo=UTC), key="America/New_York", ) - @mark_hypothesis def test_same_from_utc(self, dt, key): py_zi = py_zoneinfo.ZoneInfo(key) c_zi = c_zoneinfo.ZoneInfo(key) @@ -334,7 +325,6 @@ def test_same_from_utc(self, dt, key): @hypothesis.example(dt=datetime.datetime.min, key="America/New_York") @hypothesis.example(dt=datetime.datetime.min, key="Asia/Tokyo") @hypothesis.example(dt=datetime.datetime.max, key="Asia/Tokyo") - @mark_hypothesis def test_same_to_utc(self, dt, key): py_dt = dt.replace(tzinfo=py_zoneinfo.ZoneInfo(key)) c_dt = dt.replace(tzinfo=c_zoneinfo.ZoneInfo(key)) @@ -362,7 +352,6 @@ def test_same_to_utc(self, dt, key): @hypothesis.given(key=valid_keys()) @add_key_examples - @mark_hypothesis def test_cross_module_pickle(self, key): py_zi = py_zoneinfo.ZoneInfo(key) c_zi = c_zoneinfo.ZoneInfo(key)