MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_null_propagation

Method test_null_propagation

test/orm/dml/test_evaluator.py:290–304  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

288 )
289
290 def test_null_propagation(self):
291 User = self.classes.User
292
293 eval_eq(
294 (User.name == "foo") == (User.id == 1),
295 testcases=[
296 (User(id=1, name="foo"), True),
297 (User(id=2, name="foo"), False),
298 (User(id=1, name="bar"), False),
299 (User(id=2, name="bar"), True),
300 (User(id=None, name="foo"), None),
301 (User(id=None, name=None), None),
302 (None, None),
303 ],
304 )
305
306 def test_hybrids(self, registry):
307 @registry.mapped

Callers

nothing calls this directly

Calls 2

eval_eqFunction · 0.85
UserClass · 0.70

Tested by

no test coverage detected