(
path: str,
expression: str,
error: str,
expected_error: None | str,
lineno: int,
)
| 206 | |
| 207 | |
| 208 | def _test_fail( |
| 209 | path: str, |
| 210 | expression: str, |
| 211 | error: str, |
| 212 | expected_error: None | str, |
| 213 | lineno: int, |
| 214 | ) -> None: |
| 215 | if expected_error is None: |
| 216 | raise AssertionError(_FAIL_MSG1.format(lineno, expression, error)) |
| 217 | elif error not in expected_error: |
| 218 | raise AssertionError(_FAIL_MSG2.format( |
| 219 | lineno, expression, expected_error, error |
| 220 | )) |
| 221 | |
| 222 | |
| 223 | _REVEAL_MSG = """Reveal mismatch at line {} |
no outgoing calls
no test coverage detected