MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_case

Method test_case

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

Source from the content-addressed store, hash-verified

7185 session.query(func.max(User.name)).all()
7186
7187 def test_case(self):
7188 User = self.classes.User
7189 session = fixture_session()
7190 with self._assert_bind_args(session, expect_mapped_bind=True):
7191 session.query(case((User.name == "x", "C"), else_="W")).all()
7192
7193 def test_cast(self):
7194 User = self.classes.User

Callers

nothing calls this directly

Calls 5

_assert_bind_argsMethod · 0.95
fixture_sessionFunction · 0.90
caseFunction · 0.90
allMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected