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

Method test_abc

test/ext/test_associationproxy.py:276–291  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

274 cls.mapper_registry.map_imperatively(Child, children_table)
275
276 def test_abc(self):
277 Parent = self.classes.Parent
278
279 p1 = Parent("x")
280
281 collection_class = self.collection_class or list
282
283 for abc_ in (abc.Set, abc.MutableMapping, abc.MutableSequence):
284 if issubclass(collection_class, abc_):
285 break
286 else:
287 abc_ = None
288
289 if abc_:
290 p1 = Parent("x")
291 assert isinstance(p1.children, abc_)
292
293 def roundtrip(self, obj):
294 if obj not in self.session:

Callers

nothing calls this directly

Calls 1

ParentClass · 0.70

Tested by

no test coverage detected