MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / assertRows

Method assertRows

test/sql/test_query.py:1458–1464  ·  view source on GitHub ↗

Execute a statement and assert that rows returned equal expected.

(self, statement, expected)

Source from the content-addressed store, hash-verified

1456 )
1457
1458 def assertRows(self, statement, expected):
1459 """Execute a statement and assert that rows returned equal expected."""
1460 with testing.db.connect() as conn:
1461 found = sorted(
1462 [tuple(row) for row in conn.execute(statement).fetchall()]
1463 )
1464 eq_(found, sorted(expected))
1465
1466 def test_join_x1(self):
1467 """Joins t1->t2."""

Callers 12

test_join_x1Method · 0.95
test_join_x2Method · 0.95
test_outerjoin_x1Method · 0.95
test_outerjoin_x2Method · 0.95
test_mixedMethod · 0.95
test_mixed_whereMethod · 0.95

Calls 4

eq_Function · 0.90
connectMethod · 0.45
fetchallMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected