MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / statement_error

Function statement_error

test/sql-feature-flags/mzcompose.py:63–70  ·  view source on GitHub ↗

Generate a TD command that asserts that `statement` fails with `error_msg`.

(statement: str, error_msg: str)

Source from the content-addressed store, hash-verified

61
62
63def 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
73def statement_ok(statement: str) -> str:

Callers 2

phase1Method · 0.85
phase2Method · 0.85

Calls 3

indentFunction · 0.85
joinMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected