Skip to content

Commit

Permalink
gh-106368: Argument clinic tests: improve error message when `expect_…
Browse files Browse the repository at this point in the history
…success()` fails (#107606)
  • Loading branch information
AlexWaygood committed Aug 3, 2023
1 parent 58ef741 commit 9e6590b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/test/test_clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9e6590b

Please sign in to comment.