-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Closed
Labels
testsTests in the Lib/test dirTests in the Lib/test dir
Description
cpython/Lib/test/test_zoneinfo/test_zoneinfo_property.py
Lines 145 to 162 in d1d5dce
| @hypothesis.given(key=valid_keys()) | |
| @add_key_examples | |
| def test_pickle_unpickle_cache(self, key): | |
| zi = self.klass(key) | |
| pkl_str = pickle.dumps(zi) | |
| zi_rt = pickle.loads(pkl_str) | |
| 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) | |
| pkl_str = pickle.dumps(zi) | |
| zi_rt = pickle.loads(pkl_str) | |
| self.assertIsNot(zi, zi_rt) | |
| self.assertEqual(str(zi), str(zi_rt)) |
We should add all protocols to the test, since it might affect the property based testing.
Linked PRs
- gh-136297: Test all
pickleprotocols intest_zoneinfo_property.py#136298 - [3.14] gh-136297: Test all
pickleprotocols intest_zoneinfo_property.py(GH-136298) #136311 - [3.13] gh-136297: Test all
pickleprotocols intest_zoneinfo_property.py(GH-136298) #136312 - gh-136297: Fix
hypothesisandsubTestusage intest_zoneinfo_property.py#136384 - [3.14] gh-136297: Fix
hypothesisandsubTestusage intest_zoneinfo_property.py(GH-136384) #136407 - [3.13] gh-136297: Fix
hypothesisandsubTestusage intest_zoneinfo_property.py(GH-136384) #136408
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dir
Projects
Status
Done