MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_eq_ne

Method test_eq_ne

test/orm/test_joins.py:2934–2953  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2932 )
2933
2934 def test_eq_ne(self):
2935 Node = self.classes.Node
2936
2937 sess = fixture_session()
2938
2939 n12 = sess.query(Node).filter(Node.data == "n12").one()
2940 eq_(
2941 sess.query(Node).filter(Node.parent == n12).all(),
2942 [Node(data="n121"), Node(data="n122"), Node(data="n123")],
2943 )
2944
2945 eq_(
2946 sess.query(Node).filter(Node.parent != n12).all(),
2947 [
2948 Node(data="n1"),
2949 Node(data="n11"),
2950 Node(data="n12"),
2951 Node(data="n13"),
2952 ],
2953 )
2954
2955
2956class SelfReferentialM2MTest(fixtures.MappedTest):

Callers

nothing calls this directly

Calls 7

fixture_sessionFunction · 0.90
eq_Function · 0.90
NodeClass · 0.70
oneMethod · 0.45
filterMethod · 0.45
queryMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected