summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/assertions.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-01-13 14:33:33 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2015-01-13 14:33:33 -0500
commit92cc232726a01dd3beff762ebccd326a9659e8b9 (patch)
treea33faba2cdadd6f016feaff214fb8e2f5ecdbdb3 /lib/sqlalchemy/testing/assertions.py
parentdc55ff6f99098450f20aa702a55ece30b7e5fc7c (diff)
downloadsqlalchemy-92cc232726a01dd3beff762ebccd326a9659e8b9.tar.gz
- The multi-values version of :meth:`.Insert.values` has been
repaired to work more usefully with tables that have Python- side default values and/or functions, as well as server-side defaults. The feature will now work with a dialect that uses "positional" parameters; a Python callable will also be invoked individually for each row just as is the case with an "executemany" style invocation; a server- side default column will no longer implicitly receive the value explicitly specified for the first row, instead refusing to invoke without an explicit value. fixes #3288
Diffstat (limited to 'lib/sqlalchemy/testing/assertions.py')
-rw-r--r--lib/sqlalchemy/testing/assertions.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py
index 66d1f3cb0..46fcd64b1 100644
--- a/lib/sqlalchemy/testing/assertions.py
+++ b/lib/sqlalchemy/testing/assertions.py
@@ -229,6 +229,7 @@ class AssertsCompiledSQL(object):
def assert_compile(self, clause, result, params=None,
checkparams=None, dialect=None,
checkpositional=None,
+ check_prefetch=None,
use_default_dialect=False,
allow_dialect_select=False,
literal_binds=False):
@@ -289,6 +290,8 @@ class AssertsCompiledSQL(object):
if checkpositional is not None:
p = c.construct_params(params)
eq_(tuple([p[x] for x in c.positiontup]), checkpositional)
+ if check_prefetch is not None:
+ eq_(c.prefetch, check_prefetch)
class ComparesTables(object):