From c7d6c667b53d96a65e0dedcb83c098e03d4c7453 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 23 Dec 2015 22:59:44 -0500 Subject: - Fixed an assertion that would raise somewhat inappropriately if a :class:`.Index` were associated with a :class:`.Column` that is associated with a lower-case-t :class:`.TableClause`; the association should be ignored for the purposes of associating the index with a :class:`.Table`. fixes #3616 --- test/sql/test_metadata.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/sql/test_metadata.py') diff --git a/test/sql/test_metadata.py b/test/sql/test_metadata.py index d4039a5fe..bbc318421 100644 --- a/test/sql/test_metadata.py +++ b/test/sql/test_metadata.py @@ -2068,6 +2068,13 @@ class IndexTest(fixtures.TestBase): t.append_constraint, idx ) + def test_column_associated_w_lowercase_table(self): + from sqlalchemy import table + c = Column('x', Integer) + table('foo', c) + idx = Index('q', c) + is_(idx.table, None) # lower-case-T table doesn't have indexes + class ConstraintTest(fixtures.TestBase): -- cgit v1.2.1