From c53e218cf68de2527247e7a7d10d6aef50ba5ef9 Mon Sep 17 00:00:00 2001 From: Johannes Vass Date: Thu, 2 Jun 2022 11:48:51 +0200 Subject: [PATCH] Add stdout and stderr to mypy status error --- src/pytest_mypy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pytest_mypy.py b/src/pytest_mypy.py index 862b097..77d28da 100644 --- a/src/pytest_mypy.py +++ b/src/pytest_mypy.py @@ -222,8 +222,12 @@ def runtest(self): results = MypyResults.from_session(self.session) if results.status: raise MypyError( - "mypy exited with status {status}.".format( + "mypy exited with status {status}.\n" + "stdout: {stdout}\n" + "stderr: {stderr}".format( status=results.status, + stdout=results.stdout, + stderr=results.stderr, ), )