mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-46431: improve error message on invalid calls to BaseExceptionGroup.__new__ (GH-30854)
This commit is contained in:
parent
1c705fda8f
commit
573b545157
3 changed files with 6 additions and 2 deletions
|
@ -22,7 +22,7 @@ class TestExceptionGroupTypeHierarchy(unittest.TestCase):
|
|||
|
||||
class BadConstructorArgs(unittest.TestCase):
|
||||
def test_bad_EG_construction__too_many_args(self):
|
||||
MSG = 'function takes exactly 2 arguments'
|
||||
MSG = 'BaseExceptionGroup.__new__\(\) takes exactly 2 arguments'
|
||||
with self.assertRaisesRegex(TypeError, MSG):
|
||||
ExceptionGroup('no errors')
|
||||
with self.assertRaisesRegex(TypeError, MSG):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue