MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / test_autobegin_begin_method

Method test_autobegin_begin_method

test/orm/test_session.py:320–329  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

318 is_false(s.in_transaction())
319
320 def test_autobegin_begin_method(self):
321 s = Session(testing.db)
322
323 s.begin() # OK
324
325 assert_raises_message(
326 exc.InvalidRequestError,
327 "A transaction is already begun on this Session.",
328 s.begin,
329 )
330
331 @testing.combinations((True,), (False,), argnames="begin")
332 @testing.combinations((True,), (False,), argnames="expire_on_commit")

Callers

nothing calls this directly

Calls 3

beginMethod · 0.95
SessionClass · 0.90
assert_raises_messageFunction · 0.90

Tested by

no test coverage detected