MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_aliased_query

Method test_aliased_query

test/ext/test_hybrid.py:691–700  ·  view source on GitHub ↗
(self, use_inplace, use_classmethod)

Source from the content-addressed store, hash-verified

689 @testing.variation("use_inplace", [True, False])
690 @testing.variation("use_classmethod", [True, False])
691 def test_aliased_query(self, use_inplace, use_classmethod):
692 A = self._fixture(
693 use_inplace=use_inplace, use_classmethod=use_classmethod
694 )
695 sess = fixture_session()
696 self.assert_compile(
697 sess.query(aliased(A)).filter_by(value="foo"),
698 "SELECT a_1.id AS a_1_id, a_1.value AS a_1_value "
699 "FROM a AS a_1 WHERE foo(a_1.value) + bar(a_1.value) = :param_1",
700 )
701
702 @testing.variation("use_inplace", [True, False])
703 @testing.variation("use_classmethod", [True, False])

Callers

nothing calls this directly

Calls 6

_fixtureMethod · 0.95
fixture_sessionFunction · 0.90
aliasedFunction · 0.90
assert_compileMethod · 0.80
filter_byMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected