MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_len

Method test_len

test/sql/test_resultset.py:1677–1689  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

1675 )
1676
1677 def test_len(self, connection):
1678 users = self.tables.users
1679
1680 connection.execute(users.insert(), dict(user_id=1, user_name="foo"))
1681 r = connection.execute(users.select()).first()
1682 eq_(len(r), 2)
1683
1684 r = connection.exec_driver_sql(
1685 "select user_name, user_id from users"
1686 ).first()
1687 eq_(len(r), 2)
1688 r = connection.exec_driver_sql("select user_name from users").first()
1689 eq_(len(r), 1)
1690
1691 def test_row_mapping_get(self, connection):
1692 users = self.tables.users

Callers

nothing calls this directly

Calls 6

eq_Function · 0.90
executeMethod · 0.45
insertMethod · 0.45
firstMethod · 0.45
selectMethod · 0.45
exec_driver_sqlMethod · 0.45

Tested by

no test coverage detected