Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions test-data/unit/check-modules.test
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,11 @@ def xab(): pass # E: Name "xab" already defined (possibly by an import)
[case testAccessingUnknownModuleFromOtherModule]
import x
x.nonexistent.foo
x.z
x.z # E: Module has no attribute "z"
[file x.py]
import nonexistent
import nonexistent # E: Cannot find implementation or library stub for module named "nonexistent" \
# N: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
[builtins fixtures/module.pyi]
[out]
tmp/x.py:1: error: Cannot find implementation or library stub for module named "nonexistent"
tmp/x.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
main:3: error: Module has no attribute "z"

[case testUnknownModuleImportedWithinFunction]
def f():
Expand Down
Loading