@@ -5611,11 +5611,11 @@ class TestLazyImportSuggestions(unittest.TestCase):
56115611
56125612 def test_attribute_error_does_not_reify_lazy_imports (self ):
56135613 """Printing an AttributeError should not trigger lazy import reification."""
5614- # pkg .bar prints "BAR_MODULE_LOADED" when imported.
5614+ # lazypkg .bar prints "BAR_MODULE_LOADED" when imported.
56155615 # If lazy import is reified during suggestion computation, we'll see it.
56165616 code = textwrap .dedent ("""
5617- lazy import test.test_lazy_import.data.pkg.bar
5618- test.test_lazy_import.data.pkg .nonexistent
5617+ lazy import test.test_lazy_import.data.lazypkg
5618+ test.test_lazy_import.data.lazypkg .nonexistent
56195619 """ )
56205620 rc , stdout , stderr = assert_python_failure ('-c' , code )
56215621 self .assertNotIn (b"BAR_MODULE_LOADED" , stdout )
@@ -5624,9 +5624,9 @@ def test_traceback_formatting_does_not_reify_lazy_imports(self):
56245624 """Formatting a traceback should not trigger lazy import reification."""
56255625 code = textwrap .dedent ("""
56265626 import traceback
5627- lazy import test.test_lazy_import.data.pkg.bar
5627+ lazy import test.test_lazy_import.data.lazypkg
56285628 try:
5629- test.test_lazy_import.data.pkg .nonexistent
5629+ test.test_lazy_import.data.lazypkg .nonexistent
56305630 except AttributeError:
56315631 traceback.format_exc()
56325632 print("OK")
@@ -5638,9 +5638,9 @@ def test_traceback_formatting_does_not_reify_lazy_imports(self):
56385638 def test_suggestion_still_works_for_non_lazy_attributes (self ):
56395639 """Suggestions should still work for non-lazy module attributes."""
56405640 code = textwrap .dedent ("""
5641- lazy import test.test_lazy_import.data.pkg.bar
5641+ lazy import test.test_lazy_import.data.lazypkg
56425642 # Typo for __name__
5643- test.test_lazy_import.data.pkg .__nme__
5643+ test.test_lazy_import.data.lazypkg .__nme__
56445644 """ )
56455645 rc , stdout , stderr = assert_python_failure ('-c' , code )
56465646 self .assertIn (b"__name__" , stderr )
0 commit comments