aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_pprint.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pprint.py')
-rw-r--r--Lib/test/test_pprint.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_pprint.py b/Lib/test/test_pprint.py
index dfbc2a06e73..f68996f72b1 100644
--- a/Lib/test/test_pprint.py
+++ b/Lib/test/test_pprint.py
@@ -11,6 +11,9 @@ import re
import types
import unittest
+from test.support import cpython_only
+from test.support.import_helper import ensure_lazy_imports
+
# list, tuple and dict subclasses that do or don't overwrite __repr__
class list2(list):
pass
@@ -129,6 +132,10 @@ class QueryTestCase(unittest.TestCase):
self.b = list(range(200))
self.a[-12] = self.b
+ @cpython_only
+ def test_lazy_import(self):
+ ensure_lazy_imports("pprint", {"dataclasses", "re"})
+
def test_init(self):
pp = pprint.PrettyPrinter()
pp = pprint.PrettyPrinter(indent=4, width=40, depth=5,