diff --git a/pytest_mypy_plugins/item.py b/pytest_mypy_plugins/item.py index 957d4fa..8f5c4cc 100644 --- a/pytest_mypy_plugins/item.py +++ b/pytest_mypy_plugins/item.py @@ -394,7 +394,7 @@ def execute_extension_hook(self) -> None: def runtest(self) -> None: try: - temp_dir = tempfile.TemporaryDirectory(prefix="pytest-mypy-", dir=self.root_directory) + temp_dir = tempfile.TemporaryDirectory(prefix=f"pytest-mypy-{self.name}-", dir=self.root_directory) except (FileNotFoundError, PermissionError, NotADirectoryError) as e: raise TypecheckAssertionError(