MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / roundtrip

Method roundtrip

test/ext/test_associationproxy.py:1349–1354  ·  view source on GitHub ↗
(self, obj)

Source from the content-addressed store, hash-verified

1347 cls.mapper_registry.map_imperatively(Child, cls.tables.Children)
1348
1349 def roundtrip(self, obj):
1350 self.session.add(obj)
1351 self.session.flush()
1352 id_, type_ = obj.id, type(obj)
1353 self.session.expunge_all()
1354 return self.session.get(type_, id_)
1355
1356 def test_lazy_list(self):
1357 Parent, Child = self.classes("Parent", "Child")

Callers 5

test_lazy_listMethod · 0.95
test_eager_listMethod · 0.95
test_slicing_listMethod · 0.95
test_lazy_scalarMethod · 0.95
test_eager_scalarMethod · 0.95

Calls 4

addMethod · 0.45
flushMethod · 0.45
expunge_allMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected