From 6fbfadc7388dad4576ad99ce597e0878ee1d297f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 11 Jan 2016 14:35:56 -0500 Subject: - reorganize schema_translate_map to be succinct and gain the performance back by using an attrgetter for the default case --- lib/sqlalchemy/testing/assertsql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/testing/assertsql.py') 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 -- cgit v1.2.1