-
-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Description
In mypy internal testing suite I can omit output to indicate that I expect snippet to pass
[case import]
from collections import namedtuple
[out]
This is very useful for basics checks.
However, I cannot get similar behaviour here. If I create a package
├── mypackage
│ └── __init__.py
├── mypy.ini
└── test
└── test_mypackage.yaml
with
# ./mypackage/__init__.py
def bar(x: int) -> None:
pass
and
./test/test_mypackage.yaml
- case: test_mypackage
main: |
from mypackage import foo
tests run without errors (pytest-mypy-plugins==1.9.1
, mypy==0.910
) despite incorrect import foo
.
I have to put some output check
./test/test_mypackage.yaml
- case: test_mypackage
main: |
from mypackage import foo
reveal_type(True) # N: Revealed type is "Literal[True]?"
to get an exception.
I also tried using empty out block
- case: test_mypackage
main: |
from mypackage import foo
reveal_type(True)
out: ""
but it still silently ignores the broken import.
Metadata
Metadata
Assignees
Labels
No labels