summaryrefslogtreecommitdiff
path: root/test/engine/test_execute.py
diff options
context:
space:
mode:
authorjvanasco <jonathan@2xlp.com>2014-10-17 19:37:47 -0400
committerjvanasco <jonathan@2xlp.com>2014-10-17 19:37:47 -0400
commitefca4af93603faa7abfeacbab264cad85ee4105c (patch)
treec98b87e0a489c668acd119800c8a946dc7fdf9d4 /test/engine/test_execute.py
parent4da020dae324cb871074e302f4840e8731988be0 (diff)
parent61a4a89d993eda1d3168b501ba9ed8d94ea9b5f8 (diff)
downloadsqlalchemy-efca4af93603faa7abfeacbab264cad85ee4105c.tar.gz
Merged zzzeek/sqlalchemy into master
Diffstat (limited to 'test/engine/test_execute.py')
-rw-r--r--test/engine/test_execute.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py
index 219a145c6..e0bba0afa 100644
--- a/test/engine/test_execute.py
+++ b/test/engine/test_execute.py
@@ -479,6 +479,26 @@ class ExecuteTest(fixtures.TestBase):
eq_(canary, ["l1", "l2", "l3", "l1", "l2"])
@testing.requires.ad_hoc_engines
+ def test_autocommit_option_no_issue_first_connect(self):
+ eng = create_engine(testing.db.url)
+ eng.update_execution_options(autocommit=True)
+ conn = eng.connect()
+ eq_(conn._execution_options, {"autocommit": True})
+ conn.close()
+
+ @testing.requires.ad_hoc_engines
+ def test_dialect_init_uses_options(self):
+ eng = create_engine(testing.db.url)
+
+ def my_init(connection):
+ connection.execution_options(foo='bar').execute(select([1]))
+
+ with patch.object(eng.dialect, "initialize", my_init):
+ conn = eng.connect()
+ eq_(conn._execution_options, {})
+ conn.close()
+
+ @testing.requires.ad_hoc_engines
def test_generative_engine_event_dispatch_hasevents(self):
def l1(*arg, **kw):
pass