()
| 328 | |
| 329 | |
| 330 | def test_excinfo_repr_str() -> None: |
| 331 | excinfo1 = pytest.raises(ValueError, h) |
| 332 | assert repr(excinfo1) == "<ExceptionInfo ValueError() tblen=4>" |
| 333 | assert str(excinfo1) == "<ExceptionInfo ValueError() tblen=4>" |
| 334 | |
| 335 | class CustomException(Exception): |
| 336 | def __repr__(self): |
| 337 | return "custom_repr" |
| 338 | |
| 339 | def raises() -> None: |
| 340 | raise CustomException() |
| 341 | |
| 342 | excinfo2 = pytest.raises(CustomException, raises) |
| 343 | assert repr(excinfo2) == "<ExceptionInfo custom_repr tblen=2>" |
| 344 | assert str(excinfo2) == "<ExceptionInfo custom_repr tblen=2>" |
| 345 | |
| 346 | |
| 347 | def test_excinfo_for_later() -> None: |
nothing calls this directly
no outgoing calls
no test coverage detected