MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _assert_raises

Method _assert_raises

test/sql/test_query.py:836–844  ·  view source on GitHub ↗
(self, stmt, params)

Source from the content-addressed store, hash-verified

834 )
835
836 def _assert_raises(self, stmt, params):
837 with testing.db.connect() as conn:
838 assert_raises_message(
839 exc.StatementError,
840 "A value is required for bind parameter 'x'",
841 conn.execute,
842 stmt,
843 params,
844 )
845
846 def test_insert(self):
847 stmt = self.tables.foo.insert().values(

Callers 4

test_insertMethod · 0.95
test_select_whereMethod · 0.95
test_select_columnsMethod · 0.95
test_textMethod · 0.95

Calls 2

assert_raises_messageFunction · 0.90
connectMethod · 0.45

Tested by

no test coverage detected