()
| 39 | |
| 40 | |
| 41 | def check_basic_matches() -> None: |
| 42 | # check that matches gets rid of the naked ValueError in the union |
| 43 | exc: ExceptionGroup[ValueError] | ValueError = ExceptionGroup("", (ValueError(),)) |
| 44 | if RaisesGroup(ValueError).matches(exc): |
| 45 | assert_type(exc, ExceptionGroup[ValueError]) |
| 46 | |
| 47 | # also check that BaseExceptionGroup shows up for BaseExceptions |
| 48 | if RaisesGroup(KeyboardInterrupt).matches(exc): |
| 49 | assert_type(exc, BaseExceptionGroup[KeyboardInterrupt]) |
| 50 | |
| 51 | |
| 52 | def check_matches_with_different_exception_type() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…