]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Improve testcase condition statement for dialects 4843/head
authorj00356287 <jiajunsu@huawei.com>
Thu, 5 Sep 2019 15:39:15 +0000 (23:39 +0800)
committerj00356287 <jiajunsu@huawei.com>
Thu, 5 Sep 2019 15:39:15 +0000 (23:39 +0800)
We could get dialect.requires_name_normalize rather than use hard code
as "firebird" or "oracle", since we have add `normalize` attribute for
quite a long time.

test/engine/test_reflection.py

index 2451822b1c437c417f0aafa6a5f5a27347fae59a..2bff3fa627bc5f74f637083d65558d8cb0dba3cd 100644 (file)
@@ -1146,10 +1146,7 @@ class ReflectionTest(fixtures.TestBase, ComparesTables):
         )
         sa.Index("where", table_a.c["from"])
 
-        # There's currently no way to calculate identifier case
-        # normalization in isolation, so...
-
-        if testing.against("firebird", "oracle"):
+        if meta.bind.dialect.requires_name_normalize:
             check_col = "TRUE"
         else:
             check_col = "true"