MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_attributes

Method test_attributes

test/orm/test_scoping.py:214–244  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

212 is_(ss.get_bind(), testing.db)
213
214 def test_attributes(self):
215 expected = [
216 name
217 for cls in Session.mro()
218 for name in vars(cls)
219 if not name.startswith("_")
220 ]
221
222 ignore_list = {
223 "connection_callable",
224 "transaction",
225 "in_transaction",
226 "in_nested_transaction",
227 "get_transaction",
228 "get_nested_transaction",
229 "prepare",
230 "invalidate",
231 "bind_mapper",
232 "bind_table",
233 "enable_relationship_loading",
234 "dispatch",
235 }
236
237 SM = scoped_session(sa.orm.sessionmaker(testing.db))
238
239 missing = [
240 name
241 for name in expected
242 if not hasattr(SM, name) and name not in ignore_list
243 ]
244 eq_(missing, [])

Callers

nothing calls this directly

Calls 3

scoped_sessionClass · 0.90
eq_Function · 0.90
startswithMethod · 0.45

Tested by

no test coverage detected