(self)
| 664 | return self._check_check(exception) |
| 665 | |
| 666 | def __repr__(self) -> str: |
| 667 | parameters = [] |
| 668 | if self.expected_exceptions: |
| 669 | parameters.append(_exception_type_name(self.expected_exceptions)) |
| 670 | if self.match is not None: |
| 671 | class="cm"># If no flags were specified, discard the redundant re.compile() here. |
| 672 | parameters.append( |
| 673 | fclass="st">"match={_match_pattern(self.match)!r}", |
| 674 | ) |
| 675 | if self.check is not None: |
| 676 | parameters.append(fclass="st">"check={repr_callable(self.check)}") |
| 677 | return fclass="st">"RaisesExc({&class="cm">#x27;, '.join(parameters)})" |
| 678 | |
| 679 | def _check_type(self, exception: BaseException) -> TypeGuard[BaseExcT_co_default]: |
| 680 | self._fail_reason = _check_raw_type(self.expected_exceptions, exception) |
nothing calls this directly
no test coverage detected