From: Mike Bayer Date: Sun, 16 Oct 2011 15:34:48 +0000 (-0400) Subject: some mssql stuff, though unicode is really not working still... X-Git-Tag: rel_0_7_3~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88cb44ceee0f0c5679684c9947777a51a8b24b82;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git some mssql stuff, though unicode is really not working still... --- diff --git a/test/engine/test_reflection.py b/test/engine/test_reflection.py index b79d3b7c28..61e3506b91 100644 --- a/test/engine/test_reflection.py +++ b/test/engine/test_reflection.py @@ -1178,7 +1178,7 @@ class CaseSensitiveTest(fixtures.TablesTest): assert "SomeTable" in m.tables @testing.fails_if(testing.requires._has_mysql_fully_case_sensitive) - @testing.fails_on_everything_except('sqlite', 'mysql') + @testing.fails_on_everything_except('sqlite', 'mysql', 'mssql') def test_reflect_case_insensitive(self): m = MetaData() t2 = Table("sOmEtAbLe", m, autoload=True, autoload_with=testing.db) diff --git a/test/sql/test_types.py b/test/sql/test_types.py index 7aefac09bc..77d6bb5063 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -1144,15 +1144,16 @@ class ExpressionTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiled @testing.fails_on('firebird', 'Data type unknown on the parameter') + @testing.fails_on('mssql', 'int is unsigned ? not clear') def test_operator_adapt(self): """test type-based overloading of operators""" # test string concatenation expr = test_table.c.data + "somedata" - assert testing.db.execute(select([expr])).scalar() == "somedatasomedata" + eq_(testing.db.execute(select([expr])).scalar(), "somedatasomedata") expr = test_table.c.id + 15 - assert testing.db.execute(select([expr])).scalar() == 16 + eq_(testing.db.execute(select([expr])).scalar(), 16) # test custom operator conversion expr = test_table.c.avalue + 40 @@ -1160,17 +1161,17 @@ class ExpressionTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiled # value here is calculated as (250 - 40) / 10 = 21 # because "40" is an integer, not an "avalue" - assert testing.db.execute(select([expr.label('foo')])).scalar() == 21 + eq_(testing.db.execute(select([expr.label('foo')])).scalar(), 21) expr = test_table.c.avalue + literal(40, type_=MyCustomType) # + operator converted to - # value is calculated as: (250 - (40 * 10)) / 10 == -15 - assert testing.db.execute(select([expr.label('foo')])).scalar() == -15 + eq_(testing.db.execute(select([expr.label('foo')])).scalar(), -15) # this one relies upon anonymous labeling to assemble result # processing rules on the column. - assert testing.db.execute(select([expr])).scalar() == -15 + eq_(testing.db.execute(select([expr])).scalar(), -15) def test_typedec_operator_adapt(self): expr = test_table.c.bvalue + "hi"