diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-06-25 12:42:47 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-06-25 12:42:47 -0400 |
commit | 5771ae2ebf169b6daccac0c928013f98975e4c67 (patch) | |
tree | 46a3f2266e0f376252538515f664ef994db8f570 /test/lib/testing.py | |
parent | 7b1a1a66cd36fdfac6541e6b771fd6c849b0bd7d (diff) | |
download | sqlalchemy-5771ae2ebf169b6daccac0c928013f98975e4c67.tar.gz |
- move cte tests into their own test/sql/test_cte.py
- rework bindtemplate system of "numbered" params by applying
the numbers last, as we now need to generate these out of order
in some cases
- add positional assertion to assert_compile
- add new cte_positional collection to track bindparams generated
within cte visits; splice this onto the beginning of self.positiontup
at cte render time, [ticket:2521]
Diffstat (limited to 'test/lib/testing.py')
-rw-r--r-- | test/lib/testing.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/lib/testing.py b/test/lib/testing.py index 31ea74ba3..d3bccb53c 100644 --- a/test/lib/testing.py +++ b/test/lib/testing.py @@ -578,6 +578,7 @@ class adict(dict): class AssertsCompiledSQL(object): def assert_compile(self, clause, result, params=None, checkparams=None, dialect=None, + checkpositional=None, use_default_dialect=False, allow_dialect_select=False): if use_default_dialect: @@ -612,6 +613,9 @@ class AssertsCompiledSQL(object): if checkparams is not None: eq_(c.construct_params(params), checkparams) + if checkpositional is not None: + p = c.construct_params(params) + eq_(tuple([p[x] for x in c.positiontup]), checkpositional) class ComparesTables(object): def assert_tables_equal(self, table, reflected_table, strict_types=False): |