We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9910cfd commit 0d5efb7Copy full SHA for 0d5efb7
Lib/test/test_dataclasses/__init__.py
@@ -27,11 +27,21 @@
27
import dataclasses # Needed for the string "dataclasses.InitVar[int]" to work as an annotation.
28
29
from test import support
30
-from test.support import import_helper
+from test.support import cpython_only, import_helper
31
32
# Just any custom exception we can catch.
33
class CustomError(Exception): pass
34
35
+
36
+class TestImportTime(unittest.TestCase):
37
38
+ @cpython_only
39
+ def test_lazy_import(self):
40
+ import_helper.ensure_lazy_imports(
41
+ "dataclasses", {"inspect"}
42
+ )
43
44
45
class TestCase(unittest.TestCase):
46
def test_no_fields(self):
47
@dataclass
0 commit comments