MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_column_queries_six

Method test_column_queries_six

test/orm/test_froms.py:1981–2000  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1979 )
1980
1981 def test_column_queries_six(self):
1982 Address, User = (
1983 self.classes.Address,
1984 self.classes.User,
1985 )
1986
1987 sess = fixture_session()
1988 eq_(
1989 sess.query(func.count(Address.email_address), User)
1990 .outerjoin(User.addresses)
1991 .group_by(User)
1992 .order_by(User.id)
1993 .all(),
1994 [
1995 (1, User(name="jack", id=7)),
1996 (3, User(name="ed", id=8)),
1997 (1, User(name="fred", id=9)),
1998 (0, User(name="chuck", id=10)),
1999 ],
2000 )
2001
2002 def test_column_queries_seven(self):
2003 Address, User = (

Callers

nothing calls this directly

Calls 9

fixture_sessionFunction · 0.90
eq_Function · 0.90
UserClass · 0.70
allMethod · 0.45
order_byMethod · 0.45
group_byMethod · 0.45
outerjoinMethod · 0.45
queryMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected