Skip to content

Commit eb113cc

Browse files
committed
Add another exception check to test
1 parent eff6c1a commit eb113cc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎Lib/test/test_contextlib.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ def ctx(reraise=False):
370370
self.assertIsInstance(sys.exception(), ValueError)
371371
1/0
372372
self.assertIsInstance(sys.exception(), TypeError)
373+
self.assertIsInstance(sys.exception(), IndexError)
373374

374375
try:
375376
raise IndexError()
@@ -385,6 +386,7 @@ def ctx(reraise=False):
385386
self.assertIsInstance(sys.exception(), ValueError)
386387
1/0
387388
self.assertIsInstance(sys.exception(), TypeError)
389+
self.assertIsInstance(sys.exception(), IndexError)
388390

389391
def _create_contextmanager_attribs(self):
390392
def attribs(**kw):

0 commit comments

Comments
 (0)