From: j00356287 Date: Thu, 5 Sep 2019 15:39:15 +0000 (+0800) Subject: Improve testcase condition statement for dialects X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=304fe67b06c1f010a164806a12b68cfce9bd0d2b;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Improve testcase condition statement for dialects 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. --- diff --git a/test/engine/test_reflection.py b/test/engine/test_reflection.py index 2451822b1c..2bff3fa627 100644 --- a/test/engine/test_reflection.py +++ b/test/engine/test_reflection.py @@ -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"