diff --git a/crates/red_knot_python_semantic/resources/mdtest/import/basic.md b/crates/red_knot_python_semantic/resources/mdtest/import/basic.md index fc19ad815640a..176f09f6e0f09 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/import/basic.md +++ b/crates/red_knot_python_semantic/resources/mdtest/import/basic.md @@ -91,3 +91,16 @@ reveal_type(c.C) # revealed: Literal[C] ```py path=a/b/c.py class C: ... ``` + +## Unresolvable submodule imports + +```py +# Topmost component resolvable, submodule not resolvable: +import a.foo # error: [unresolved-import] "Cannot resolve import `a.foo`" + +# Topmost component unresolvable: +import b.foo # error: [unresolved-import] "Cannot resolve import `b.foo`" +``` + +```py path=a/__init__.py +```