diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2024-06-07 17:44:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-07 17:44:56 (GMT) |
commit | e6076d1e1303c3cc14bc02baf607535af2cf1501 (patch) | |
tree | 30630958c7164479d688739bf3eba9d17b4c98b7 /Lib/test | |
parent | 242c7498e5a889b47847fb6f0f133ce461fa7e24 (diff) | |
download | cpython-e6076d1e1303c3cc14bc02baf607535af2cf1501.zip cpython-e6076d1e1303c3cc14bc02baf607535af2cf1501.tar.gz cpython-e6076d1e1303c3cc14bc02baf607535af2cf1501.tar.bz2 |
gh-119659: Get the datetime CAPI Tests Running Again (gh-120180)
The tests were accidentally disabled by 2da0dc0, which didn't handle classes correctly.
I considered updating no_rerun() to support classes, but the way test_datetime.py works would have made things fairly messy. Plus, it looks like the refleaks we had encountered before have been resolved.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/datetimetester.py | 3 | ||||
-rw-r--r-- | Lib/test/support/__init__.py | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py index 3759504..b80da56 100644 --- a/Lib/test/datetimetester.py +++ b/Lib/test/datetimetester.py @@ -22,7 +22,7 @@ from operator import lt, le, gt, ge, eq, ne, truediv, floordiv, mod from test import support from test.support import is_resource_enabled, ALWAYS_EQ, LARGEST, SMALLEST -from test.support import warnings_helper, no_rerun +from test.support import warnings_helper import datetime as datetime_module from datetime import MINYEAR, MAXYEAR @@ -6385,7 +6385,6 @@ class IranTest(ZoneInfoTest): @unittest.skipIf(_testcapi is None, 'need _testcapi module') -@no_rerun("the encapsulated datetime C API does not support reloading") class CapiTest(unittest.TestCase): def setUp(self): # Since the C API is not present in the _Pure tests, skip all tests diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 4b320b4..9e6100d 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -1197,6 +1197,7 @@ def no_rerun(reason): test using the 'reason' parameter. """ def deco(func): + assert not isinstance(func, type), func _has_run = False def wrapper(self): nonlocal _has_run |