Lines Matching refs:EG
469 # on how to iterate over leaf nodes of an EG. Is is also
554 """ Split an EG and do some sanity checks on the result """
794 class EG(ExceptionGroup):
802 raise EG("nested", [te])
803 except EG as nested:
807 raise EG("eg", [ve, nested])
808 except EG as e:
811 self.assertMatchesTemplate(eg, EG, [ValueError(1), [TypeError(2)]])
836 class EG(BaseExceptionGroup):
845 raise EG("eg", [ValueError(1), KeyboardInterrupt(2)], "unused")
846 except EG as e:
850 eg, EG, [ValueError(1), KeyboardInterrupt(2)])
878 class EG(ExceptionGroup):
885 return EG(self.message, excs, self.code)
892 raise EG("nested", [te], 101)
893 except EG as nested:
897 raise EG("eg", [ve, nested], 42)
898 except EG as e:
901 self.assertMatchesTemplate(eg, EG, [ValueError(1), [TypeError(2)]])
906 self.assertMatchesTemplate(rest, EG, [ValueError(1), [TypeError(2)]])
912 self.assertMatchesTemplate(match, EG, [ValueError(1), [TypeError(2)]])
919 self.assertMatchesTemplate(match, EG, [ValueError(1)])
921 self.assertMatchesTemplate(rest, EG, [[TypeError(2)]])
927 self.assertMatchesTemplate(match, EG, [[TypeError(2)]])
930 self.assertMatchesTemplate(rest, EG, [ValueError(1)])