[3.12] gh-106368: Argument clinic tests: improve failure message when tests in ClinicExternalTests fail (GH-107364) (#107365)

gh-106368: Argument clinic tests: improve failure message when tests in `ClinicExternalTests` fail (GH-107364)
(cherry picked from commit 76c26eaca4)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Miss Islington (bot) 2023-07-27 17:39:51 -07:00 committed by GitHub
parent abaf89d908
commit 2827ad2f31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1360,7 +1360,7 @@ class ClinicExternalTest(TestCase):
) as proc: ) as proc:
proc.wait() proc.wait()
if expect_success and proc.returncode: if expect_success and proc.returncode:
self.fail("".join(proc.stderr)) self.fail("".join([*proc.stdout, *proc.stderr]))
stdout = proc.stdout.read() stdout = proc.stdout.read()
stderr = proc.stderr.read() stderr = proc.stderr.read()
# Clinic never writes to stderr. # Clinic never writes to stderr.