summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/assertsql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-01-11 14:35:56 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2016-01-11 16:44:28 -0500
commit6fbfadc7388dad4576ad99ce597e0878ee1d297f (patch)
tree2aeaeec66050d6377ae719f825b6d5f45ea62252 /lib/sqlalchemy/testing/assertsql.py
parentb301f009e18246db9277a4b9d7e3a1bf01a92ae9 (diff)
downloadsqlalchemy-6fbfadc7388dad4576ad99ce597e0878ee1d297f.tar.gz
- reorganize schema_translate_map to be succinct and gain the performance
back by using an attrgetter for the default case
Diffstat (limited to 'lib/sqlalchemy/testing/assertsql.py')
-rw-r--r--lib/sqlalchemy/testing/assertsql.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/testing/assertsql.py b/lib/sqlalchemy/testing/assertsql.py
index 904149c16..56c422cf1 100644
--- a/lib/sqlalchemy/testing/assertsql.py
+++ b/lib/sqlalchemy/testing/assertsql.py
@@ -90,7 +90,7 @@ class CompiledSQL(SQLMatchRule):
context.compiled.statement.compile(
dialect=compare_dialect,
schema_translate_map=context.
- compiled.preparer.schema_translate_map)
+ execution_options.get('schema_translate_map'))
else:
compiled = (
context.compiled.statement.compile(
@@ -98,7 +98,7 @@ class CompiledSQL(SQLMatchRule):
column_keys=context.compiled.column_keys,
inline=context.compiled.inline,
schema_translate_map=context.
- compiled.preparer.schema_translate_map)
+ execution_options.get('schema_translate_map'))
)
_received_statement = re.sub(r'[\n\t]', '', util.text_type(compiled))
parameters = execute_observed.parameters