MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_round_trip

Method test_round_trip

test/orm/test_composites.py:847–860  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

845 return Thing, AB, CD
846
847 def test_round_trip(self):
848 Thing, AB, CD = self._fixture()
849
850 s = fixture_session()
851
852 s.add(Thing(AB("a", "b", CD("c", "d"))))
853 s.commit()
854
855 s.close()
856
857 t1 = (
858 s.query(Thing).filter(Thing.ab == AB("a", "b", CD("c", "d"))).one()
859 )
860 eq_(t1.ab, AB("a", "b", CD("c", "d")))
861
862
863class EventsEtcTest(fixtures.MappedTest):

Callers

nothing calls this directly

Calls 12

_fixtureMethod · 0.95
fixture_sessionFunction · 0.90
eq_Function · 0.90
CDClass · 0.85
ThingClass · 0.70
ABClass · 0.70
addMethod · 0.45
commitMethod · 0.45
closeMethod · 0.45
oneMethod · 0.45
filterMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected