MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _get_test_uow

Method _get_test_uow

test/orm/test_sync.py:18–27  ·  view source on GitHub ↗
(self, session)

Source from the content-addressed store, hash-verified

16
17class AssertsUOW:
18 def _get_test_uow(self, session):
19 uow = unitofwork.UOWTransaction(session)
20 deleted = set(session._deleted)
21 new = set(session._new)
22 dirty = set(session._dirty_states).difference(deleted)
23 for s in new.union(dirty):
24 uow.register_object(s)
25 for d in deleted:
26 uow.register_object(d, isdelete=True)
27 return uow
28
29
30class SyncTest(

Callers 1

_fixtureMethod · 0.45

Calls 3

register_objectMethod · 0.95
differenceMethod · 0.45
unionMethod · 0.45

Tested by

no test coverage detected