MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_standalone_w_subquery

Method test_standalone_w_subquery

test/orm/test_query.py:4642–4649  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4640
4641 @testing.emits_warning("Column-expression-level unary distinct")
4642 def test_standalone_w_subquery(self):
4643 # additional test for #6008
4644 User = self.classes.User
4645
4646 q = fixture_session().query(distinct(User.id))
4647 subq = q.subquery()
4648 q = fixture_session().query(subq).order_by(subq.c[0])
4649 eq_([(7,), (8,), (9,), (10,)], q.all())
4650
4651 def test_no_automatic_distinct_thing_w_future(self):
4652 User = self.classes.User

Callers

nothing calls this directly

Calls 7

fixture_sessionFunction · 0.90
distinctFunction · 0.90
eq_Function · 0.90
queryMethod · 0.45
subqueryMethod · 0.45
order_byMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected