MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _check_default_slots

Method _check_default_slots

test/sql/test_defaults.py:200–212  ·  view source on GitHub ↗
(self, tbl, name, *wanted)

Source from the content-addressed store, hash-verified

198 c.arg("context")
199
200 def _check_default_slots(self, tbl, name, *wanted):
201 slots = [
202 "default",
203 "onupdate",
204 "server_default",
205 "server_onupdate",
206 ]
207 col = tbl.c[name]
208 for slot in wanted:
209 slots.remove(slot)
210 assert getattr(col, slot) is not None, getattr(col, slot)
211 for slot in slots:
212 assert getattr(col, slot) is None, getattr(col, slot)
213
214 def test_py_vs_server_default_detection_one(self):
215 has_ = self._check_default_slots

Callers

nothing calls this directly

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected