Generate a TD command that asserts that `statement` fails with `error_msg`.
(statement: str, error_msg: str)
| 61 | |
| 62 | |
| 63 | def statement_error(statement: str, error_msg: str) -> str: |
| 64 | """Generate a TD command that asserts that `statement` fails with `error_msg`.""" |
| 65 | return "\n".join( |
| 66 | [ |
| 67 | indent(statement.strip(), prefix=" ").replace(" ", "! ", 1), |
| 68 | f"contains:{error_msg}", |
| 69 | ] |
| 70 | ) |
| 71 | |
| 72 | |
| 73 | def statement_ok(statement: str) -> str: |