diff options
Diffstat (limited to 'test/sql/labels.py')
-rw-r--r-- | test/sql/labels.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/sql/labels.py b/test/sql/labels.py index 53022a6a0..d69a67ef4 100644 --- a/test/sql/labels.py +++ b/test/sql/labels.py @@ -5,6 +5,15 @@ from sqlalchemy import * # TODO: either create a mock dialect with named paramstyle and a short identifier length, # or find a way to just use sqlite dialect and make those changes +class LabelTypeTest(testbase.PersistTest): + def test_type(self): + m = MetaData() + t = Table('sometable', m, + Column('col1', Integer), + Column('col2', Float)) + assert isinstance(t.c.col1.label('hi').type, Integer) + assert isinstance(select([t.c.col2], scalar=True).label('lala').type, Float) + class LongLabelsTest(testbase.PersistTest): def setUpAll(self): global metadata, table1 |