diff options
author | Michael Trier <mtrier@gmail.com> | 2008-12-29 21:38:04 +0000 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2008-12-29 21:38:04 +0000 |
commit | df267fcc77e116d0c64d62b0231526811dfb4769 (patch) | |
tree | 48ebe8af7d83c96edca45599f58066218cbc84d3 /test/dialect/mssql.py | |
parent | f9adad3acce8a219393f6997e77be8c44f05f0e4 (diff) | |
download | sqlalchemy-df267fcc77e116d0c64d62b0231526811dfb4769.tar.gz |
Added in MSGenericBinary to the mssql dialect tests.
Diffstat (limited to 'test/dialect/mssql.py')
-rwxr-xr-x | test/dialect/mssql.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/test/dialect/mssql.py b/test/dialect/mssql.py index f63787e74..babb493ac 100755 --- a/test/dialect/mssql.py +++ b/test/dialect/mssql.py @@ -555,8 +555,13 @@ class TypesTest2(TestBase, AssertsExecutionResults): 'VARBINARY(10)'), (mssql.MSImage, [], {}, - 'IMAGE') - ] + 'IMAGE'), + + (types.Binary, [], {}, + 'IMAGE'), + (types.Binary, [10], {}, + 'BINARY(10)') + ] table_args = ['test_mssql_binary', MetaData(testing.db)] for index, spec in enumerate(columns): @@ -580,7 +585,11 @@ class TypesTest2(TestBase, AssertsExecutionResults): reflected_binary = Table('test_mssql_binary', MetaData(testing.db), autoload=True) for col in reflected_binary.c: - testing.eq_(col.type.__class__, binary_table.c[col.name].type.__class__) + # don't test the MSGenericBinary since it's a special case and + # reflected it will map to a MSImage or MSBinary depending + if not testing.db.dialect.type_descriptor(binary_table.c[col.name].type).__class__ == mssql.MSGenericBinary: + testing.eq_(testing.db.dialect.type_descriptor(col.type).__class__, + testing.db.dialect.type_descriptor(binary_table.c[col.name].type).__class__) if binary_table.c[col.name].type.length: testing.eq_(col.type.length, binary_table.c[col.name].type.length) binary_table.drop() @@ -864,7 +873,7 @@ class BinaryTest(TestBase, AssertsExecutionResults): def tearDownAll(self): binary_table.drop() - def testbinary(self): + def test_binary(self): testobj1 = pickleable.Foo('im foo 1') testobj2 = pickleable.Foo('im foo 2') testobj3 = pickleable.Foo('im foo 3') |