diff --git a/test-data/unit/daemon.test b/test-data/unit/daemon.test index ca2c969d2f5e9..07eaff0c64d49 100644 --- a/test-data/unit/daemon.test +++ b/test-data/unit/daemon.test @@ -615,3 +615,20 @@ b: str from demo.test import a [file demo/test.py] a: int + +[case testUnusedTypeIgnorePreservedOnRerun] +-- Regression test for https://github.com/python/mypy/issues/9655 +$ dmypy start -- --warn-unused-ignores --no-error-summary --hide-error-codes +Daemon started +$ dmypy check -- bar.py +bar.py:2: error: Unused "type: ignore" comment +== Return code: 1 +$ dmypy check -- bar.py +bar.py:2: error: Unused "type: ignore" comment +== Return code: 1 + +[file foo/__init__.py] +[file foo/empty.py] +[file bar.py] +from foo.empty import * +a = 1 # type: ignore