From 08fe2611ab45d0af08232da1b8cbf06ec63a2e9d Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Fri, 28 Jul 2023 00:57:55 +0100 Subject: [PATCH] gh-106368: Argument clinic tests: improve failure message when tests in `ClinicExternalTests` fail (GH-107364) (cherry picked from commit 76c26eaca4147ba7e3e8d7379c5a828f0b512a46) Co-authored-by: Alex Waygood --- Lib/test/test_clinic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py index 32c4b1e67f9574..1c01fb0ed36888 100644 --- a/Lib/test/test_clinic.py +++ b/Lib/test/test_clinic.py @@ -1306,7 +1306,7 @@ def _do_test(self, *args, expect_success=True): ) as proc: proc.wait() if expect_success and proc.returncode: - self.fail("".join(proc.stderr)) + self.fail("".join([*proc.stdout, *proc.stderr])) stdout = proc.stdout.read() stderr = proc.stderr.read() # Clinic never writes to stderr.