File tree Expand file tree Collapse file tree
Lib/test/test_lazy_import Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -679,7 +679,7 @@ class ErrorHandlingTests(LazyImportTestCase):
679679 """Tests for error handling during lazy import reification."""
680680
681681 def test_missing_lazy_submodule_raises_module_not_found_error (self ):
682- """Accessing a nonexistent lazy submodule via parent attr raises AttributeError ."""
682+ """Accessing a nonexistent lazy submodule via parent attr raises ModuleNotFoundError ."""
683683 code = textwrap .dedent ("""
684684 lazy import test.test_lazy_import.data.nonexistent_module
685685
@@ -693,7 +693,7 @@ def test_missing_lazy_submodule_raises_module_not_found_error(self):
693693 assert_python_ok ("-c" , code )
694694
695695 def test_non_package_lazily_imported (self ):
696- """Accessing a nonexistent lazy submodule via parent attr raises ModuleNotFoundError."""
696+ """Accessing a nonexistent lazy name via parent attr raises ModuleNotFoundError."""
697697 code = textwrap .dedent ("""
698698 lazy import math.pi
699699
@@ -707,7 +707,7 @@ def test_non_package_lazily_imported(self):
707707 assert_python_ok ("-c" , code )
708708
709709 def test_missing_attribute_raises_import_error (self ):
710- """Accessing a nonexistent lazy submodule via from import raises ImportError."""
710+ """Accessing a nonexistent lazy name via from import raises ImportError."""
711711 code = textwrap .dedent ("""
712712 lazy from sys import doesnotexist
713713
Original file line number Diff line number Diff line change 1- import traceback
2- traceback .print_stack ()
3- while True : pass
41print ("BAR_MODULE_LOADED" )
52def f (): pass
You can’t perform that action at this time.
0 commit comments