diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2021-11-07 21:19:45 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2021-11-07 21:19:45 +0000 |
commit | 201c00bc0837af831f115e8313ad3ccb0be97e7a (patch) | |
tree | beb7558e95d073b63fa4bb76d830ccaa2de9711a /test/sql/test_compiler.py | |
parent | 5b1c9053b0903b2d5a06f82b47fe16a870696ddc (diff) | |
parent | d050193daaa8d91371c759296f3304b8641c1976 (diff) | |
download | sqlalchemy-201c00bc0837af831f115e8313ad3ccb0be97e7a.tar.gz |
Merge "fully implement future engine and remove legacy" into main
Diffstat (limited to 'test/sql/test_compiler.py')
-rw-r--r-- | test/sql/test_compiler.py | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/test/sql/test_compiler.py b/test/sql/test_compiler.py index 4c8b1a434..3ced05df2 100644 --- a/test/sql/test_compiler.py +++ b/test/sql/test_compiler.py @@ -4926,38 +4926,36 @@ class KwargPropagationTest(fixtures.TestBase): class ExecutionOptionsTest(fixtures.TestBase): def test_non_dml(self): - stmt = table1.select() + stmt = table1.select().execution_options(foo="bar") compiled = stmt.compile() - eq_(compiled.execution_options, {}) + eq_(compiled.execution_options, {"foo": "bar"}) def test_dml(self): - stmt = table1.insert() + stmt = table1.insert().execution_options(foo="bar") compiled = stmt.compile() - eq_(compiled.execution_options, {"autocommit": True}) + eq_(compiled.execution_options, {"foo": "bar"}) def test_embedded_element_true_to_none(self): - stmt = table1.insert() - eq_(stmt._execution_options, {"autocommit": True}) + stmt = table1.insert().execution_options(foo="bar") + eq_(stmt._execution_options, {"foo": "bar"}) s2 = select(table1).select_from(stmt.cte()) eq_(s2._execution_options, {}) compiled = s2.compile() - eq_(compiled.execution_options, {"autocommit": True}) + eq_(compiled.execution_options, {}) def test_embedded_element_true_to_false(self): - stmt = table1.insert() - eq_(stmt._execution_options, {"autocommit": True}) + stmt = table1.insert().execution_options(foo="bar") + eq_(stmt._execution_options, {"foo": "bar"}) s2 = ( - select(table1) - .select_from(stmt.cte()) - .execution_options(autocommit=False) + select(table1).select_from(stmt.cte()).execution_options(foo="bat") ) - eq_(s2._execution_options, {"autocommit": False}) + eq_(s2._execution_options, {"foo": "bat"}) compiled = s2.compile() - eq_(compiled.execution_options, {"autocommit": False}) + eq_(compiled.execution_options, {"foo": "bat"}) class DDLTest(fixtures.TestBase, AssertsCompiledSQL): |