-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
tox -e py310-pytest7.x-mypy0.9x
is currently failing 15 tests:
15 failed, 32 passed, 6 xfailed, 18 warnings in 56.12s
(Warnings are pytest-dev/pytest-cov#561.)
This diff seems to fix it:
diff --git a/src/pytest_mypy.py b/src/pytest_mypy.py
index d067925..fd1ba4d 100644
--- a/src/pytest_mypy.py
+++ b/src/pytest_mypy.py
@@ -262,7 +262,9 @@ class MypyResults:
os.path.abspath(str(item.fspath)): [] for item in items
} # type: MypyResults._abspath_errors_type
- stdout, stderr, status = mypy.api.run(opts + list(abspath_errors))
+ stdout, stderr, status = mypy.api.run(
+ opts + list(os.path.relpath(key) for key in abspath_errors.keys())
+ )
unmatched_lines = []
for line in stdout.split("\n"):
Because of that, I suspect python/mypy#14042 is to blame.
Metadata
Metadata
Assignees
Labels
No labels