File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -5004,6 +5004,26 @@ def func():
50045004 actual = self .get_suggestion (func )
50055005 self .assertIn ("forget to import '_io'" , actual )
50065006
5007+ def test_import_builtin_module_typo_suggestion (self ):
5008+ def func ():
5009+ import itertool # noqa: F401
5010+
5011+ actual = self .get_suggestion (func )
5012+ self .assertIn ("Did you mean: 'itertools'?" , actual )
5013+
5014+ def test_import_file_module_typo_suggestion (self ):
5015+ def func ():
5016+ import abs # noqa: F401
5017+
5018+ actual = self .get_suggestion (func )
5019+ self .assertIn ("Did you mean: 'abc'?" , actual )
5020+
5021+ def test_import_submodule_typo_suggestion (self ):
5022+ def func ():
5023+ import multiprocessing .dumy # noqa: F401
5024+
5025+ actual = self .get_suggestion (func )
5026+ self .assertIn ("Did you mean: 'multiprocessing.dummy'?" , actual )
50075027
50085028
50095029class PurePythonSuggestionFormattingTests (
You can’t perform that action at this time.
0 commit comments