MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_abc

Method test_abc

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

ParentClass · 0.70

Tested by

no test coverage detected