diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-04-17 16:10:59 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-04-17 16:10:59 -0400 |
| commit | 566f4688777118adfa51009adc19be9f1625167e (patch) | |
| tree | b292e4f042aa751e1a7fb34798347f2ebf7e724b /test/sql/test_generative.py | |
| parent | 69dcd805d2c6ed92adf81da443c5c06d23d3423a (diff) | |
| download | sqlalchemy-566f4688777118adfa51009adc19be9f1625167e.tar.gz | |
- move documentation of available execution options to Connection - this is the main
place these should be used
- Executable disallows "compiled_cache" option for now which was previously being ignored
[ticket:2131]
- Query now passes execution options to the Connection rather than the statement
so that all options are allowed including compiled cache.
Diffstat (limited to 'test/sql/test_generative.py')
| -rw-r--r-- | test/sql/test_generative.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/sql/test_generative.py b/test/sql/test_generative.py index 0634ded40..47e45bbb9 100644 --- a/test/sql/test_generative.py +++ b/test/sql/test_generative.py @@ -3,9 +3,9 @@ from sqlalchemy.sql import table, column, ClauseElement from sqlalchemy.sql.expression import _clone, _from_objects from test.lib import * from sqlalchemy.sql.visitors import * -from sqlalchemy import util +from sqlalchemy import util, exc from sqlalchemy.sql import util as sql_util -from test.lib.testing import eq_ +from test.lib.testing import eq_, assert_raises class TraversalTest(fixtures.TestBase, AssertsExecutionResults): """test ClauseVisitor's traversal, particularly its @@ -1074,6 +1074,18 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): assert s2._execution_options == dict(foo='bar', bar='baz') assert s3._execution_options == dict(foo='not bar') + def test_invalid_options(self): + assert_raises( + exc.ArgumentError, + select().execution_options, compiled_cache={} + ) + + assert_raises( + exc.ArgumentError, + select().execution_options, + isolation_level='READ_COMMITTED' + ) + # this feature not available yet def _NOTYET_test_execution_options_in_kwargs(self): s = select(execution_options=dict(foo='bar')) |
