mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
gh-120544: Add else: fail()
to tests where exception is expected (#120545)
This commit is contained in:
parent
d4039d3f6f
commit
42ebdd83bb
2 changed files with 12 additions and 0 deletions
|
@ -1859,6 +1859,8 @@ class NameErrorTests(unittest.TestCase):
|
|||
except self.failureException:
|
||||
with support.captured_stderr() as err:
|
||||
sys.__excepthook__(*sys.exc_info())
|
||||
else:
|
||||
self.fail("assertRaisesRegex should have failed.")
|
||||
|
||||
self.assertIn("aab", err.getvalue())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue