Skip to content

Commit dba232a

Browse files
committed
added test for missing module
1 parent 2bf3bb4 commit dba232a

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

test-data/unit/semanal-errors.test

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,26 @@ main:2: error: Cannot find implementation or library stub for module named "m.n"
296296
main:2: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
297297
main:3: error: Cannot find implementation or library stub for module named "a.b"
298298

299+
[case testMissingModuleFuzzyMatchThirdParty]
300+
import numpyy
301+
[out]
302+
main:1: error: Cannot find implementation or library stub for module named "numpyy"
303+
main:1: note: Did you mean "numpy"?
304+
main:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
305+
306+
[case testMissingModuleFuzzyMatchStdlib]
307+
import ittertools
308+
[out]
309+
main:1: error: Cannot find implementation or library stub for module named "ittertools"
310+
main:1: note: Did you mean "itertools"?
311+
main:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
312+
313+
[case testMissingModuleFuzzyMatchNoSuggestion]
314+
import xyzabc123
315+
[out]
316+
main:1: error: Cannot find implementation or library stub for module named "xyzabc123"
317+
main:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
318+
299319
[case testErrorInImportedModule]
300320
import m
301321
[file m.py]

0 commit comments

Comments
 (0)