diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-08-18 22:53:09 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-08-19 10:43:38 -0400 |
commit | d1005e130558b33fd455be6d994e8e863799a318 (patch) | |
tree | 4e6b3acdf0476ddcdb61afbce782c064afd9a12a /lib/sqlalchemy/testing/assertsql.py | |
parent | 0901190bb440580f0664fe3f6310173762b908e0 (diff) | |
download | sqlalchemy-d1005e130558b33fd455be6d994e8e863799a318.tar.gz |
Implement DDL visitor for PG ENUM with schema translate support
Fixed issue where the :class:`_postgresql.ENUM` type would not consult the
schema translate map when emitting a CREATE TYPE or DROP TYPE during the
test to see if the type exists or not. Additionally, repaired an issue
where if the same enum were encountered multiple times in a single DDL
sequence, the "check" query would run repeatedly rather than relying upon a
cached value.
Fixes: #5520
Change-Id: I79f46e29ac0168e873ff178c242f8d78f6679aeb
Diffstat (limited to 'lib/sqlalchemy/testing/assertsql.py')
-rw-r--r-- | lib/sqlalchemy/testing/assertsql.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/testing/assertsql.py b/lib/sqlalchemy/testing/assertsql.py index caf61a806..73b062b96 100644 --- a/lib/sqlalchemy/testing/assertsql.py +++ b/lib/sqlalchemy/testing/assertsql.py @@ -195,12 +195,12 @@ class CompiledSQL(SQLMatchRule): class RegexSQL(CompiledSQL): - def __init__(self, regex, params=None): + def __init__(self, regex, params=None, dialect="default"): SQLMatchRule.__init__(self) self.regex = re.compile(regex) self.orig_regex = regex self.params = params - self.dialect = "default" + self.dialect = dialect def _failure_message(self, expected_params): return ( |