summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/suite
diff options
context:
space:
mode:
authorGord Thompson <gord@gordthompson.com>2020-01-20 15:21:17 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2020-01-23 19:29:25 -0500
commit9e3977738c7c698442cb88f4201f995d8901a45f (patch)
treed9a457993e66609f8f38d4e0182bbeef3fa2d24d /lib/sqlalchemy/testing/suite
parentd8ac1e9e6bfc931d2f14f9846d6924106f56b7e6 (diff)
downloadsqlalchemy-9e3977738c7c698442cb88f4201f995d8901a45f.tar.gz
Add test requirement: indexes_with_ascdesc
There are some tests for indexes that include DESC in the columns. Firebird and maybe others don't support this concept, so put it under a requirement rule. Fixes: #5106 Closes: #5108 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5108 Pull-request-sha: 4b1560f28a52feb7d4a6c5d828f587a735d6a40b Change-Id: I4744246005f3af263ea1e028d8a46795b87de62c
Diffstat (limited to 'lib/sqlalchemy/testing/suite')
-rw-r--r--lib/sqlalchemy/testing/suite/test_reflection.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py
index 9b6cec10c..85e193d8e 100644
--- a/lib/sqlalchemy/testing/suite/test_reflection.py
+++ b/lib/sqlalchemy/testing/suite/test_reflection.py
@@ -292,8 +292,10 @@ class ComponentReflectionTest(fixtures.TablesTest):
Column("q", sa.String(5)),
test_needs_fk=True,
)
- Index("noncol_idx_nopk", noncol_idx_test_nopk.c.q.desc())
- Index("noncol_idx_pk", noncol_idx_test_pk.c.q.desc())
+
+ if testing.requires.indexes_with_ascdesc.enabled:
+ Index("noncol_idx_nopk", noncol_idx_test_nopk.c.q.desc())
+ Index("noncol_idx_pk", noncol_idx_test_pk.c.q.desc())
if testing.requires.view_column_reflection.enabled:
cls.define_views(metadata, schema)
@@ -882,10 +884,12 @@ class ComponentReflectionTest(fixtures.TablesTest):
eq_(list(t.indexes)[0].name, ixname)
@testing.requires.index_reflection
+ @testing.requires.indexes_with_ascdesc
def test_get_noncol_index_no_pk(self):
self._test_get_noncol_index("noncol_idx_test_nopk", "noncol_idx_nopk")
@testing.requires.index_reflection
+ @testing.requires.indexes_with_ascdesc
def test_get_noncol_index_pk(self):
self._test_get_noncol_index("noncol_idx_test_pk", "noncol_idx_pk")