summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2016-10-20 16:37:00 -0400
committerGerrit Code Review <gerrit2@ln3.zzzcomputing.com>2016-10-20 16:37:00 -0400
commit78f2864b90c9df03aaa2fdddb9fd7d394abdbc31 (patch)
tree2648da64c9a95c9b6db5a81fc1d76b484659a0b6 /test
parent39d5a97266544f45d8b2f8d666d41b0dafb38c42 (diff)
parentc97b1b82282553d42e5893a094926602b0a2406d (diff)
downloadsqlalchemy-78f2864b90c9df03aaa2fdddb9fd7d394abdbc31.tar.gz
Merge "Convert expression type for concat + Enum"
Diffstat (limited to 'test')
-rw-r--r--test/sql/test_types.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/sql/test_types.py b/test/sql/test_types.py
index 3374a6721..7f49991e6 100644
--- a/test/sql/test_types.py
+++ b/test/sql/test_types.py
@@ -1264,6 +1264,25 @@ class EnumTest(AssertsCompiledSQL, fixtures.TablesTest):
]
)
+ def test_validators_not_in_concatenate_roundtrip(self):
+ enum_table = self.tables['non_native_enum_table']
+
+ enum_table.insert().execute([
+ {'id': 1, 'someenum': 'two'},
+ {'id': 2, 'someenum': 'two'},
+ {'id': 3, 'someenum': 'one'},
+ ])
+
+ eq_(
+ select(['foo' + enum_table.c.someenum]).
+ order_by(enum_table.c.id).execute().fetchall(),
+ [
+ ('footwo', ),
+ ('footwo', ),
+ ('fooone', )
+ ]
+ )
+
@testing.fails_on(
'postgresql+zxjdbc',
'zxjdbc fails on ENUM: column "XXX" is of type XXX '