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

Method roundtrip

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

Source from the content-addressed store, hash-verified

291 assert isinstance(p1.children, abc_)
292
293 def roundtrip(self, obj):
294 if obj not in self.session:
295 self.session.add(obj)
296 self.session.flush()
297 id_, type_ = obj.id, type(obj)
298 self.session.expunge_all()
299 return self.session.get(type_, id_)
300
301 def _test_sequence_ops(self):
302 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