From: Jason Kirtland Date: Thu, 4 Oct 2007 18:31:31 +0000 (+0000) Subject: Adjusted reserved word reflection test for oracle-style identifier dialects. But... X-Git-Tag: rel_0_4_0~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fb5f1047c00a81bd80406d6989aa55e7060b107;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Adjusted reserved word reflection test for oracle-style identifier dialects. But probably the CheckConstraint part of this test should just be removed, as it's testing a non-extant feature. --- diff --git a/test/engine/reflection.py b/test/engine/reflection.py index d271ba25f3..4b7b2f72fa 100644 --- a/test/engine/reflection.py +++ b/test/engine/reflection.py @@ -515,23 +515,19 @@ class ReflectionTest(PersistTest): UniqueConstraint('from', name='when')) Index('where', table_a.c['from']) - if testbase.db.engine.name == 'firebird': - # Firebird doesn't like creating the constraint with 'true' column - # quoted, when this column was created without quotes - # it will work with one of these 2 syntaxes: - # - # CONSTRAINT limit CHECK (true <> 1) - # CONSTRAINT limit CHECK ('TRUE' <> 1) - # - # for now, I'll use the 1st option - quoter = lambda x: x + # There's currently no way to calculate identifier case normalization + # in isolation, so... + if testbase.db.engine.name in ('firebird', 'oracle'): + check_col = 'TRUE' else: - quoter = meta.bind.dialect.identifier_preparer.quote_identifier + check_col = 'true' + quoter = meta.bind.dialect.identifier_preparer.quote_identifier table_b = Table('false', meta, Column('create', Integer, primary_key=True), Column('true', Integer, ForeignKey('select.not')), - CheckConstraint('%s <> 1' % quoter('true'), name='limit')) + CheckConstraint('%s <> 1' % quoter(check_col), + name='limit')) table_c = Table('is', meta, Column('or', Integer, nullable=False, primary_key=True),