bpo-45292: [PEP 654] add the ExceptionGroup and BaseExceptionGroup classes (GH-28569)

This commit is contained in:
Irit Katriel 2021-10-23 00:13:46 +01:00 committed by GitHub
parent 4bc5473a42
commit f30ad65dbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 1366 additions and 4 deletions

View file

@ -4032,7 +4032,11 @@ order (MRO) for bases """
for tp in builtin_types:
object.__getattribute__(tp, "__bases__")
if tp is not object:
self.assertEqual(len(tp.__bases__), 1, tp)
if tp is ExceptionGroup:
num_bases = 2
else:
num_bases = 1
self.assertEqual(len(tp.__bases__), num_bases, tp)
class L(list):
pass