summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/assertions.py
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2020-03-24 19:53:14 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2020-03-24 19:53:14 +0000
commitfa1f67a01e80367d73cf5d1d93b6f7f51dc1746b (patch)
tree7c0c5e37a7d1708289a68fcdf30df9dad9013088 /lib/sqlalchemy/testing/assertions.py
parente817d1415d825bcf8c8f33927baaf56cd5d07b95 (diff)
parentcadfc608d63f4e0df46c0daaa28902423fd88d71 (diff)
downloadsqlalchemy-fa1f67a01e80367d73cf5d1d93b6f7f51dc1746b.tar.gz
Merge "Convert schema_translate to a post compile"
Diffstat (limited to 'lib/sqlalchemy/testing/assertions.py')
-rw-r--r--lib/sqlalchemy/testing/assertions.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py
index e0bf4326e..7dada1394 100644
--- a/lib/sqlalchemy/testing/assertions.py
+++ b/lib/sqlalchemy/testing/assertions.py
@@ -352,6 +352,8 @@ class AssertsCompiledSQL(object):
literal_binds=False,
render_postcompile=False,
schema_translate_map=None,
+ render_schema_translate=False,
+ default_schema_name=None,
inline_flag=None,
):
if use_default_dialect:
@@ -371,6 +373,9 @@ class AssertsCompiledSQL(object):
elif isinstance(dialect, util.string_types):
dialect = url.URL(dialect).get_dialect()()
+ if default_schema_name:
+ dialect.default_schema_name = default_schema_name
+
kw = {}
compile_kwargs = {}
@@ -386,6 +391,9 @@ class AssertsCompiledSQL(object):
if render_postcompile:
compile_kwargs["render_postcompile"] = True
+ if render_schema_translate:
+ kw["render_schema_translate"] = True
+
from sqlalchemy import orm
if isinstance(clause, orm.Query):