]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-136297: Fix `hypothesis` and `subTest` usage in `test_zoneinfo_property.py` (...
authorsobolevn <mail@sobolevn.me>
Tue, 8 Jul 2025 07:51:36 +0000 (10:51 +0300)
committerGitHub <noreply@github.com>
Tue, 8 Jul 2025 07:51:36 +0000 (07:51 +0000)
Lib/test/test_zoneinfo/test_zoneinfo_property.py
Tools/requirements-hypothesis.txt

index 294c7e9b27a85747b8823bf7c8ac1ad0f0034371..c00815e2fd4c364c0358a832f5dc92045cc7df1b 100644 (file)
@@ -147,23 +147,21 @@ class ZoneInfoPickleTest(ZoneInfoTestBase):
     def test_pickle_unpickle_cache(self, key):
         zi = self.klass(key)
         for proto in range(pickle.HIGHEST_PROTOCOL + 1):
-            with self.subTest(proto=proto):
-                pkl_str = pickle.dumps(zi, proto)
-                zi_rt = pickle.loads(pkl_str)
+            pkl_str = pickle.dumps(zi, proto)
+            zi_rt = pickle.loads(pkl_str)
 
-                self.assertIs(zi, zi_rt)
+            self.assertIs(zi, zi_rt)
 
     @hypothesis.given(key=valid_keys())
     @add_key_examples
     def test_pickle_unpickle_no_cache(self, key):
         zi = self.klass.no_cache(key)
         for proto in range(pickle.HIGHEST_PROTOCOL + 1):
-            with self.subTest(proto=proto):
-                pkl_str = pickle.dumps(zi, proto)
-                zi_rt = pickle.loads(pkl_str)
+            pkl_str = pickle.dumps(zi, proto)
+            zi_rt = pickle.loads(pkl_str)
 
-                self.assertIsNot(zi, zi_rt)
-                self.assertEqual(str(zi), str(zi_rt))
+            self.assertIsNot(zi, zi_rt)
+            self.assertEqual(str(zi), str(zi_rt))
 
     @hypothesis.given(key=valid_keys())
     @add_key_examples
index 66898885c0a4121a893ca4932172d1d4c3a8fd49..e5deac497fbe3f2cd44f79dc02a1adcd3af07313 100644 (file)
@@ -1,4 +1,4 @@
 # Requirements file for hypothesis that
 # we use to run our property-based tests in CI.
 
-hypothesis==6.111.2
+hypothesis==6.135.26