(msg: str, add_prefix: bool = True)
| 26 | |
| 27 | |
| 28 | def fails_raises_group(msg: str, add_prefix: bool = True) -> RaisesExc[Failed]: |
| 29 | assert msg[-1] != "\n", ( |
| 30 | "developer error, expected string should not end with newline" |
| 31 | ) |
| 32 | prefix = "Raised exception group did not match: " if add_prefix else "" |
| 33 | return pytest.raises(Failed, match=wrap_escape(prefix + msg)) |
| 34 | |
| 35 | |
| 36 | def test_raises_group() -> None: |