mirror of
https://github.com/python/cpython
synced 2024-09-16 05:29:56 +00:00
gh-106368: Argument clinic tests: improve error message when expect_success()
fails (#107606)
This commit is contained in:
parent
58ef741867
commit
9e6590b097
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue