MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_inplace_add_operator

Method test_inplace_add_operator

test/ext/test_baked.py:74–89  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

72 eq_(q1.steps, [l1, l2])
73
74 def test_inplace_add_operator(self):
75 User = self.classes.User
76 session = fixture_session()
77
78 def l1():
79 return session.query(User)
80
81 def l2(q):
82 return q.filter(User.name == bindparam("name"))
83
84 q1 = self.bakery(l1)
85 self._assert_cache_key(q1._cache_key, [l1])
86
87 q1 += l2
88
89 self._assert_cache_key(q1._cache_key, [l1, l2])
90
91 def test_chained_add(self):
92 User = self.classes.User

Callers

nothing calls this directly

Calls 3

_assert_cache_keyMethod · 0.95
fixture_sessionFunction · 0.90
bakeryMethod · 0.80

Tested by

no test coverage detected