We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c55a9ea commit 97e8f41Copy full SHA for 97e8f41
src/pytest_mypy/__init__.py
@@ -397,4 +397,11 @@ def pytest_terminal_summary(
397
terminalreporter.write_line(results.unmatched_stdout, **color)
398
if results.stderr:
399
terminalreporter.write_line(results.stderr, yellow=True)
400
- mypy_results_path.unlink()
+
401
+ def pytest_unconfigure(self, config: pytest.Config) -> None:
402
+ """Clean up the mypy results path."""
403
+ try:
404
+ config.stash[stash_key["config"]].mypy_results_path.unlink()
405
+ except FileNotFoundError: # compat python < 3.8 (missing_ok=True)
406
+ # No MypyItems executed.
407
+ return
0 commit comments