MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_compare_to_value

Method test_compare_to_value

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

Source from the content-addressed store, hash-verified

73 cls.mapper_registry.map_imperatively(User, users)
74
75 def test_compare_to_value(self):
76 User = self.classes.User
77
78 eval_eq(
79 User.name == "foo",
80 testcases=[
81 (User(name="foo"), True),
82 (User(name="bar"), False),
83 (User(name=None), None),
84 ],
85 )
86
87 eval_eq(
88 User.id < 5,
89 testcases=[
90 (User(id=3), True),
91 (User(id=5), False),
92 (User(id=None), None),
93 ],
94 )
95
96 def test_compare_to_callable_bind(self):
97 User = self.classes.User

Callers

nothing calls this directly

Calls 2

eval_eqFunction · 0.85
UserClass · 0.70

Tested by

no test coverage detected