diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-12-04 16:40:20 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-12-04 16:49:02 -0500 |
| commit | 36d0a27770efdebb0b1891083cb72d8ac65c4788 (patch) | |
| tree | 35610c2d340d28d473655f84d02f23620b32dc8a /test/sql | |
| parent | e447582b8575eaf165f02864a4b0b977930b3a52 (diff) | |
| download | sqlalchemy-36d0a27770efdebb0b1891083cb72d8ac65c4788.tar.gz | |
Propagate attachment events for ARRAY
Fixed regression in :class:`.ARRAY` datatype caused by
:ticket:`3964`, which is essentially the same
issue as that of :ticket:`3832`, where column attachment events
for :class:`.ARRAY` would not be invoked. This breaks the use case
of using declarative mixins that declare a :class:`.Column` which
makes use of :meth:`.MutableList.as_mutable`.
Change-Id: If8c57615860883837f6cf72661e46180a77778c1
Fixes: #4141
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_metadata.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/sql/test_metadata.py b/test/sql/test_metadata.py index 7071782c4..45eb59453 100644 --- a/test/sql/test_metadata.py +++ b/test/sql/test_metadata.py @@ -7,7 +7,7 @@ from sqlalchemy import Integer, String, UniqueConstraint, \ ForeignKeyConstraint, PrimaryKeyConstraint, ColumnDefault, Index, event,\ events, Unicode, types as sqltypes, bindparam, \ Table, Column, Boolean, Enum, func, text, TypeDecorator, \ - BLANK_SCHEMA + BLANK_SCHEMA, ARRAY from sqlalchemy import schema, exc from sqlalchemy.engine import default from sqlalchemy.sql import elements, naming @@ -1650,6 +1650,14 @@ class SchemaTypeTest(fixtures.TestBase): typ = MyType() self._test_before_parent_attach(typ, target_typ, double=True) + def test_before_parent_attach_array_enclosing_schematype(self): + # test for [ticket:4141] which is the same idea as [ticket:3832] + # for ARRAY + + typ = ARRAY(String) + + self._test_before_parent_attach(typ) + def test_before_parent_attach_typedec_of_schematype(self): class MyType(TypeDecorator, sqltypes.SchemaType): impl = String |
