bpo-45292: [PEP-654] add except* (GH-29581)

This commit is contained in:
Irit Katriel 2021-12-14 16:48:15 +00:00 committed by GitHub
parent 850aefc2c6
commit d60457a667
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 7070 additions and 3332 deletions

View file

@ -211,7 +211,8 @@ class ExceptionGroupSubgroupTests(ExceptionGroupTestBase):
def test_basics_subgroup_split__bad_arg_type(self):
bad_args = ["bad arg",
OSError('instance not type'),
[OSError('instance not type')],]
[OSError, TypeError],
(OSError, 42)]
for arg in bad_args:
with self.assertRaises(TypeError):
self.eg.subgroup(arg)