MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _two_obj_fixture

Method _two_obj_fixture

test/orm/test_attributes.py:1755–1772  ·  view source on GitHub ↗
(self, uselist, active_history=False)

Source from the content-addressed store, hash-verified

1753 return Foo
1754
1755 def _two_obj_fixture(self, uselist, active_history=False):
1756 class Foo(BasicEntity):
1757 pass
1758
1759 class Bar(BasicEntity):
1760 def __bool__(self):
1761 assert False
1762
1763 instrumentation.register_class(Foo)
1764 instrumentation.register_class(Bar)
1765 _register_attribute(
1766 Foo,
1767 "someattr",
1768 uselist=uselist,
1769 useobject=True,
1770 active_history=active_history,
1771 )
1772 return Foo, Bar
1773
1774 def _someattr_history(self, f, **kw):
1775 passive = kw.pop("passive", None)

Calls 1

_register_attributeFunction · 0.70

Tested by

no test coverage detected