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

Method roundtrip

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

Source from the content-addressed store, hash-verified

293 assert isinstance(p1.children, abc_)
294
295 def roundtrip(self, obj):
296 if obj not in self.session:
297 self.session.add(obj)
298 self.session.flush()
299 id_, type_ = obj.id, type(obj)
300 self.session.expunge_all()
301 return self.session.get(type_, id_)
302
303 def _test_sequence_ops(self):
304 Parent, Child = self.classes("Parent", "Child")

Callers 1

_test_sequence_opsMethod · 0.95

Calls 4

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

Tested by

no test coverage detected