diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2020-05-02 03:33:18 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2020-05-02 03:33:18 +0000 |
| commit | 3c161737207b6af154923e4db9a0a1d67970cddf (patch) | |
| tree | 02b0f81871dc26d84353e74832bce9685327c61d /test | |
| parent | f247bb20007190ae7aa89929c02c03317b1e6876 (diff) | |
| parent | 45a334e38c1baab34d3195c899cb9ca617fb52a7 (diff) | |
| download | sqlalchemy-3c161737207b6af154923e4db9a0a1d67970cddf.tar.gz | |
Merge "Handle non-string, non column expression in index for deferred attach"
Diffstat (limited to 'test')
| -rw-r--r-- | test/sql/test_metadata.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/sql/test_metadata.py b/test/sql/test_metadata.py index c57932bed..36f308073 100644 --- a/test/sql/test_metadata.py +++ b/test/sql/test_metadata.py @@ -9,6 +9,7 @@ from sqlalchemy import Boolean from sqlalchemy import CheckConstraint from sqlalchemy import Column from sqlalchemy import ColumnDefault +from sqlalchemy import desc from sqlalchemy import Enum from sqlalchemy import event from sqlalchemy import exc @@ -2635,6 +2636,23 @@ class ConstraintTest(fixtures.TestBase): idx, ) + def test_non_attached_col_plus_string_expr(self): + # another one that declarative can lead towards + metadata = MetaData() + + t1 = Table("a", metadata, Column("id", Integer)) + + c2 = Column("x", Integer) + + # if we do it here, no problem + # t1.append_column(c2) + + idx = Index("foo", c2, desc("foo")) + + t1.append_column(c2) + + self._assert_index_col_x(t1, idx, columns=True) + def test_column_associated_w_lowercase_table(self): from sqlalchemy import table |
