MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_round_trip

Method test_round_trip

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

Source from the content-addressed store, hash-verified

846 return Thing, AB, CD
847
848 def test_round_trip(self):
849 Thing, AB, CD = self._fixture()
850
851 s = fixture_session()
852
853 s.add(Thing(AB("a", "b", CD("c", "d"))))
854 s.commit()
855
856 s.close()
857
858 t1 = (
859 s.query(Thing).filter(Thing.ab == AB("a", "b", CD("c", "d"))).one()
860 )
861 eq_(t1.ab, AB("a", "b", CD("c", "d")))
862
863
864class 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