()
| 318 | |
| 319 | |
| 320 | def test_excinfo_exconly(): |
| 321 | excinfo = pytest.raises(ValueError, h) |
| 322 | assert excinfo.exconly().startswith("ValueError") |
| 323 | with pytest.raises(ValueError) as excinfo: |
| 324 | raise ValueError("hello\nworld") |
| 325 | msg = excinfo.exconly(tryshort=True) |
| 326 | assert msg.startswith("ValueError") |
| 327 | assert msg.endswith("world") |
| 328 | |
| 329 | |
| 330 | def test_excinfo_repr_str() -> None: |