Skip to content

Commit 6c40c3a

Browse files
committed
add test
1 parent c3cfa67 commit 6c40c3a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Lib/test/test_site.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import test.support
99
from test import support
1010
from test.support.script_helper import assert_python_ok
11+
from test.support import import_helper
1112
from test.support import os_helper
1213
from test.support import socket_helper
1314
from test.support import captured_stderr
@@ -574,6 +575,17 @@ def test_license_exists_at_url(self):
574575
code = e.code
575576
self.assertEqual(code, 200, msg="Can't find " + url)
576577

578+
@support.cpython_only
579+
def test_lazy_imports(self):
580+
import_helper.ensure_lazy_imports("site", [
581+
"io",
582+
"locale",
583+
"traceback",
584+
"atexit",
585+
"warnings",
586+
"textwrap",
587+
])
588+
577589

578590
class StartupImportTests(unittest.TestCase):
579591

0 commit comments

Comments
 (0)