diff options
author | jvanasco <jonathan@2xlp.com> | 2014-10-17 19:37:47 -0400 |
---|---|---|
committer | jvanasco <jonathan@2xlp.com> | 2014-10-17 19:37:47 -0400 |
commit | efca4af93603faa7abfeacbab264cad85ee4105c (patch) | |
tree | c98b87e0a489c668acd119800c8a946dc7fdf9d4 /test/engine/test_execute.py | |
parent | 4da020dae324cb871074e302f4840e8731988be0 (diff) | |
parent | 61a4a89d993eda1d3168b501ba9ed8d94ea9b5f8 (diff) | |
download | sqlalchemy-efca4af93603faa7abfeacbab264cad85ee4105c.tar.gz |
Merged zzzeek/sqlalchemy into master
Diffstat (limited to 'test/engine/test_execute.py')
-rw-r--r-- | test/engine/test_execute.py | 20 |
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 |