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

Method test_attributes

test/orm/test_scoping.py:214–244  ·  test/orm/test_scoping.py::ScopedSessionTest.test_attributes
(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(class="st">"_")
220 ]
221
222 ignore_list = {
223 class="st">"connection_callable",
224 class="st">"transaction",
225 class="st">"in_transaction",
226 class="st">"in_nested_transaction",
227 class="st">"get_transaction",
228 class="st">"get_nested_transaction",
229 class="st">"prepare",
230 class="st">"invalidate",
231 class="st">"bind_mapper",
232 class="st">"bind_table",
233 class="st">"enable_relationship_loading",
234 class="st">"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