From 1b48a4364473666fb7a0882bc21963ff2c849599 Mon Sep 17 00:00:00 2001 From: AlexWaygood Date: Thu, 3 Aug 2023 21:43:51 +0100 Subject: [PATCH] Argument clinic tests: improve error message when `expect_success()` fails --- Lib/test/test_clinic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py index 2f945663618722..3aa41631d3637a 100644 --- a/Lib/test/test_clinic.py +++ b/Lib/test/test_clinic.py @@ -1680,7 +1680,8 @@ def run_clinic(self, *args): def expect_success(self, *args): out, err, code = self.run_clinic(*args) - self.assertEqual(code, 0, f"Unexpected failure: {args=}") + if code != 0: + self.fail("\n".join([f"Unexpected failure: {args=}", out, err])) self.assertEqual(err, "") return out pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy