()
| 341 | |
| 342 | |
| 343 | def test_excinfo_exconly(): |
| 344 | with pytest.raises(ValueError) as excinfo: |
| 345 | h() |
| 346 | assert excinfo.exconly().startswith("ValueError") |
| 347 | with pytest.raises(ValueError) as excinfo: |
| 348 | raise ValueError("hello\nworld") |
| 349 | msg = excinfo.exconly(tryshort=True) |
| 350 | assert msg.startswith("ValueError") |
| 351 | assert msg.endswith("world") |
| 352 | |
| 353 | |
| 354 | def test_excinfo_repr_str() -> None: |