diff options
Diffstat (limited to 'Lib/test/test_pickle.py')
-rw-r--r-- | Lib/test/test_pickle.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_pickle.py b/Lib/test/test_pickle.py index 3b46e524aac..742ca8de1be 100644 --- a/Lib/test/test_pickle.py +++ b/Lib/test/test_pickle.py @@ -15,7 +15,8 @@ from textwrap import dedent import doctest import unittest from test import support -from test.support import import_helper, os_helper +from test.support import cpython_only, import_helper, os_helper +from test.support.import_helper import ensure_lazy_imports from test.pickletester import AbstractHookTests from test.pickletester import AbstractUnpickleTests @@ -36,6 +37,12 @@ except ImportError: has_c_implementation = False +class LazyImportTest(unittest.TestCase): + @cpython_only + def test_lazy_import(self): + ensure_lazy_imports("pickle", {"re"}) + + class PyPickleTests(AbstractPickleModuleTests, unittest.TestCase): dump = staticmethod(pickle._dump) dumps = staticmethod(pickle._dumps) |