summaryrefslogtreecommitdiff
path: root/test/sql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-11-13 11:01:49 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2015-11-13 11:01:49 -0500
commit37565d2ce2b4f0db5023c2549e2ddcb4a4ba0f7c (patch)
tree6045f2052416cb4638e332253e8aa7bc568cbcfa /test/sql
parent3370cbde509b3e230c46a503956f11f78df74b88 (diff)
downloadsqlalchemy-37565d2ce2b4f0db5023c2549e2ddcb4a4ba0f7c.tar.gz
- fix missing argument in TypeDecorator.copy(), fixes #3584, references #2919
Diffstat (limited to 'test/sql')
-rw-r--r--test/sql/test_metadata.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/sql/test_metadata.py b/test/sql/test_metadata.py
index 501df4671..d4039a5fe 100644
--- a/test/sql/test_metadata.py
+++ b/test/sql/test_metadata.py
@@ -7,7 +7,7 @@ from sqlalchemy import Integer, String, UniqueConstraint, \
CheckConstraint, ForeignKey, MetaData, Sequence, \
ForeignKeyConstraint, PrimaryKeyConstraint, ColumnDefault, Index, event,\
events, Unicode, types as sqltypes, bindparam, \
- Table, Column, Boolean, Enum, func, text
+ Table, Column, Boolean, Enum, func, text, TypeDecorator
from sqlalchemy import schema, exc
from sqlalchemy.sql import elements, naming
import sqlalchemy as tsa
@@ -1547,6 +1547,20 @@ class SchemaTypeTest(fixtures.TestBase):
# our test type sets table, though
is_(t2.c.y.type.table, t2)
+ def test_tometadata_copy_decorated(self):
+
+ class MyDecorated(TypeDecorator):
+ impl = self.MyType
+
+ m1 = MetaData()
+
+ type_ = MyDecorated(schema="z")
+ t1 = Table('x', m1, Column("y", type_))
+
+ m2 = MetaData()
+ t2 = t1.tometadata(m2)
+ eq_(t2.c.y.type.schema, "z")
+
def test_tometadata_independent_schema(self):
m1 = MetaData()