(msg)
| 18 | |
| 19 | |
| 20 | def test_error_already_set(msg): |
| 21 | with pytest.raises(RuntimeError) as excinfo: |
| 22 | m.throw_already_set(False) |
| 23 | assert ( |
| 24 | msg(excinfo.value) |
| 25 | == "Internal error: pybind11::error_already_set called while Python error indicator not set." |
| 26 | ) |
| 27 | |
| 28 | with pytest.raises(ValueError) as excinfo: |
| 29 | m.throw_already_set(True) |
| 30 | assert msg(excinfo.value) == "foo" |
| 31 | |
| 32 | |
| 33 | def test_raise_from(msg): |