summaryrefslogtreecommitdiff
path: root/test/sql/test_quote.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-07-04 15:54:29 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2017-04-05 12:18:36 -0400
commit86ef507cc73ee4a0a104b334d7ce08ad045e0c76 (patch)
treea077e8f2de416e7a2affb898a13982f8136ad8ba /test/sql/test_quote.py
parent87b1404eda0f6d2e99b3b2a01ae1c641fbe91311 (diff)
downloadsqlalchemy-86ef507cc73ee4a0a104b334d7ce08ad045e0c76.tar.gz
Double percent signs based on paramstyle, not dialect
This patch moves the "doubling" of percent signs into the base compiler and makes it completely a product of whether or not the paramstyle is format/pyformat or not. Without this paramstyle, percent signs are not doubled across text(), literal_column(), and column(). Change-Id: Ie2f278ab1dbb94b5078f85c0096d74dbfa049197 Fixes: #3740
Diffstat (limited to 'test/sql/test_quote.py')
-rw-r--r--test/sql/test_quote.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/sql/test_quote.py b/test/sql/test_quote.py
index a436dde67..477fca783 100644
--- a/test/sql/test_quote.py
+++ b/test/sql/test_quote.py
@@ -1,12 +1,12 @@
-from sqlalchemy import *
+from sqlalchemy import MetaData, Table, Column, Integer, select, \
+ ForeignKey, Index, CheckConstraint, inspect, column
from sqlalchemy import sql, schema
from sqlalchemy.sql import compiler
from sqlalchemy.testing import fixtures, AssertsCompiledSQL, eq_
from sqlalchemy import testing
-from sqlalchemy.sql.elements import (quoted_name,
- _truncated_label,
- _anonymous_label)
+from sqlalchemy.sql.elements import quoted_name, _anonymous_label
from sqlalchemy.testing.util import picklers
+from sqlalchemy.engine import default
class QuoteExecTest(fixtures.TestBase):
@@ -700,7 +700,7 @@ class PreparerTest(fixtures.TestBase):
"""Test the db-agnostic quoting services of IdentifierPreparer."""
def test_unformat(self):
- prep = compiler.IdentifierPreparer(None)
+ prep = compiler.IdentifierPreparer(default.DefaultDialect())
unformat = prep.unformat_identifiers
def a_eq(have, want):
@@ -732,7 +732,7 @@ class PreparerTest(fixtures.TestBase):
def _unescape_identifier(self, value):
return value.replace('``', '`')
- prep = Custom(None)
+ prep = Custom(default.DefaultDialect())
unformat = prep.unformat_identifiers
def a_eq(have, want):