MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / assertRows

Method assertRows

test/sql/test_query.py:1526–1532  ·  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

1524 )
1525
1526 def assertRows(self, statement, expected):
1527 """Execute a statement and assert that rows returned equal expected."""
1528 with testing.db.connect() as conn:
1529 found = sorted(
1530 [tuple(row) for row in conn.execute(statement).fetchall()]
1531 )
1532 eq_(found, sorted(expected))
1533
1534 def test_join_x1(self):
1535 """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