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

Class MyColumn

test/sql/test_metadata.py:140–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138
139 def test_col_subclass_copy(self):
140 class MyColumn(schema.Column):
141 def __init__(self, *args, **kw):
142 self.widget = kw.pop("widget", None)
143 super().__init__(*args, **kw)
144
145 def _copy(self, *arg, **kw):
146 c = super()._copy(*arg, **kw)
147 c.widget = self.widget
148 return c
149
150 c1 = MyColumn("foo", Integer, widget="x")
151 c2 = c1._copy()

Callers 4

_constructorMethod · 0.70

Calls

no outgoing calls

Tested by 4

_constructorMethod · 0.56