summaryrefslogtreecommitdiff
path: root/test/sql
diff options
context:
space:
mode:
authorSebastian Bank <sebastian.bank@uni-leipzig.de>2015-06-19 17:37:21 +0200
committerSebastian Bank <sebastian.bank@uni-leipzig.de>2015-06-19 17:37:21 +0200
commit84e813aee4b47edb5220bc76083525d1ac4e45ba (patch)
tree2f0d33f16a632da1f57da6105bece8cade5091fc /test/sql
parent370b237ddb6af0ba62f0ce5b1bedfe7556c6ccf3 (diff)
downloadsqlalchemy-84e813aee4b47edb5220bc76083525d1ac4e45ba.tar.gz
add ClauseElement.cast() shortcut-method
Diffstat (limited to 'test/sql')
-rw-r--r--test/sql/test_type_expressions.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/sql/test_type_expressions.py b/test/sql/test_type_expressions.py
index 574edfe9e..c35e9ff53 100644
--- a/test/sql/test_type_expressions.py
+++ b/test/sql/test_type_expressions.py
@@ -40,6 +40,13 @@ class SelectTest(_ExprFixture, fixtures.TestBase, AssertsCompiledSQL):
"SELECT CAST(test_table.y AS VARCHAR) AS anon_1 FROM test_table"
)
+ def test_cast_method(self):
+ table = self._fixture()
+ self.assert_compile(
+ select([table.c.y.cast(String)]),
+ "SELECT CAST(test_table.y AS VARCHAR) AS anon_1 FROM test_table"
+ )
+
def test_select_cols_use_labels(self):
table = self._fixture()