diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py index 3759504b02e550..b80da5697ef865 100644 --- a/Lib/test/datetimetester.py +++ b/Lib/test/datetimetester.py @@ -22,7 +22,7 @@ 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 4b320b494bb8dd..9e6100d2b89d6e 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