diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-10-07 12:43:27 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-10-07 12:43:27 -0400 |
| commit | 2885f78e4e20c2ae8552594ac7f0231b1bee4aad (patch) | |
| tree | bd06ea192635a3e3aec311490994687298cf41dd /test/engine/test_execute.py | |
| parent | 5a10b6a455f9ad7be752469cbaa503857ae9fda2 (diff) | |
| download | sqlalchemy-2885f78e4e20c2ae8552594ac7f0231b1bee4aad.tar.gz | |
- adjustment for ref #3200 as we need an immutabledict() here so
that union() can be called, in the case of a dialect that uses
execution options inside of initialize() (e.g. oursql)
Diffstat (limited to 'test/engine/test_execute.py')
| -rw-r--r-- | test/engine/test_execute.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py index a80d157ed..e0bba0afa 100644 --- a/test/engine/test_execute.py +++ b/test/engine/test_execute.py @@ -487,6 +487,18 @@ class ExecuteTest(fixtures.TestBase): 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 |
