MCPcopy Create free account
hub / github.com/python/cpython / test_reraise_all_named

Method test_reraise_all_named

Lib/test/test_except_star.py:450–465  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

448
449class TestExceptStarReraise(ExceptStarTest):
450 def test_reraise_all_named(self):
451 try:
452 try:
453 raise ExceptionGroup(
454 "eg", [TypeError(1), ValueError(2), OSError(3)])
455 except* TypeError as e:
456 raise
457 except* ValueError as e:
458 raise
459 # OSError not handled
460 except ExceptionGroup as e:
461 exc = e
462
463 self.assertExceptionIsLike(
464 exc,
465 ExceptionGroup("eg", [TypeError(1), ValueError(2), OSError(3)]))
466
467 def test_reraise_all_unnamed(self):
468 try:

Callers

nothing calls this directly

Calls 1

assertExceptionIsLikeMethod · 0.80

Tested by

no test coverage detected