]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Disabling tests for mssql+mxodbc where mxODBC cursor.execute chokes on invalid placem...
authorBrad Allen <bradallen137@gmail.com>
Tue, 16 Mar 2010 22:57:54 +0000 (16:57 -0600)
committerBrad Allen <bradallen137@gmail.com>
Tue, 16 Mar 2010 22:57:54 +0000 (16:57 -0600)
test/dialect/test_mssql.py
test/sql/test_query.py
test/sql/test_quote.py
test/sql/test_types.py

index 89a3af5fb55e54162339b252f63cef03b7d9838c..824de2b9d7f84fdc02bcd8d56620010a37df3c06 100644 (file)
@@ -270,6 +270,7 @@ class IdentityInsertTest(TestBase, AssertsCompiledSQL):
 class ReflectionTest(TestBase, ComparesTables):
     __only_on__ = 'mssql'
 
+    @testing.crashes('mssql+mxodbc', 'Invalid bind parameter placement')
     def test_basic_reflection(self):
         meta = MetaData(testing.db)
 
@@ -311,6 +312,7 @@ class ReflectionTest(TestBase, ComparesTables):
         finally:
             meta.drop_all()
 
+    @testing.crashes('mssql+mxodbc', 'Invalid bind parameter placement')
     def test_identity(self):
         meta = MetaData(testing.db)
         table = Table(
@@ -1109,7 +1111,8 @@ class TypesTest(TestBase, AssertsExecutionResults, ComparesTables):
         testing.eq_(gen.get_column_specification(t.c.t), "t %s" % expected)
         self.assert_(repr(t.c.t))
         t.create(checkfirst=True)
-    
+
+    @testing.crashes('mssql+mxodbc', 'Invalid bind parameter placement')
     def test_autoincrement(self):
         Table('ai_1', metadata,
                Column('int_y', Integer, primary_key=True),
index 4ccc51713f1e8ba501df49c6d74eb24453209dc1..aacc99435f76ba44a9a6c5478f456ba11398625c 100644 (file)
@@ -229,7 +229,11 @@ class QueryTest(TestBase):
         for row in select([sel + 1, sel + 3], bind=users.bind).execute():
             assert row['anon_1'] == 8
             assert row['anon_2'] == 10
-    
+
+    @testing.crashes('mssql+mxodbc', """Invalid bind parameter placement:
+       'SELECT ? + query_users.user_name AS thedata \nFROM query_users 
+       ORDER BY ? + query_users.user_name' ('test: ', 'test:')
+       """)
     @testing.fails_on('firebird', "kinterbasdb doesn't send full type information")
     def test_order_by_label(self):
         """test that a label within an ORDER BY works on each backend.
@@ -767,6 +771,10 @@ class QueryTest(TestBase):
         # Null values are not outside any set
         assert len(r) == 0
 
+    @testing.crashes('mssql+mxodbc', """Invalid bind parameter placement:
+        'SELECT query_users.user_id, query_users.user_name \nFROM query_users 
+        WHERE ? = ?' ('john', 'john')
+       """)
     @testing.emits_warning('.*empty sequence.*')
     @testing.fails_on('firebird', "kinterbasdb doesn't send full type information")
     @testing.fails_if(lambda: 
@@ -1027,6 +1035,15 @@ class CompoundTest(TestBase):
     def _fetchall_sorted(self, executed):
         return sorted([tuple(row) for row in executed.fetchall()])
 
+    @testing.crashes('mssql+mxodbc', """Invalid bind parameter placement:
+        InterfaceError: (InterfaceError) ('07009', 0, '[Microsoft][SQL Server
+        Native Client 10.0]Invalid parameter number', 7513) 
+        'SELECT bar.col3, bar.col4 \nFROM (SELECT t1.col3 AS col3, 
+        t1.col4 AS col4 \nFROM t1 \nWHERE t1.col2 IN (?, ?) 
+        UNION SELECT t2.col3 AS col3, t2.col4 AS col4 \nFROM t2 
+        WHERE t2.col2 IN (?, ?)) AS bar' ('t1col2r1', 't1col2r2', 
+        't2col2r2','t2col2r3')
+         """)
     @testing.requires.subqueries
     def test_union(self):
         (s1, s2) = (
@@ -1059,6 +1076,15 @@ class CompoundTest(TestBase):
                   ('ccc', 'aaa')]
         eq_(u.execute().fetchall(), wanted)
 
+    @testing.crashes('mssql+mxodbc', """Invalid bind parameter placement:
+        InterfaceError: (InterfaceError) ('07009', 0, '[Microsoft][SQL Server 
+        Native Client 10.0]Invalid parameter number', 7513) 
+        'SELECT bar.col3, bar.col4 \nFROM (SELECT t1.col3 AS col3, 
+        t1.col4 AS col4 \nFROM t1 \nWHERE t1.col2 IN (?, ?) 
+        UNION SELECT t2.col3 AS col3, t2.col4 AS col4
+        FROM t2 \nWHERE t2.col2 IN (?, ?)) AS bar'
+        ('t1col2r1', 't1col2r2', 't2col2r2', 't2col2r3')
+         """)
     @testing.fails_on('firebird', "doesn't like ORDER BY with UNIONs")
     @testing.fails_on('maxdb', 'FIXME: unknown')
     @testing.requires.subqueries
@@ -1577,6 +1603,9 @@ class OperatorTest(TestBase):
     def teardown_class(cls):
         metadata.drop_all()
 
+    @testing.crashes('mssql+mxodbc', """Invalid bind parameter placement:
+         'SELECT flds.intcol % ? AS anon_1 \nFROM flds ORDER BY flds.idcol' (3,)
+       """)
     @testing.fails_on('maxdb', 'FIXME: unknown')
     def test_modulo(self):
         eq_(
index f4df98b9e868a2904220940d8d23f1cddeba328b..1b14bbd6752bbd2f3c721703cbe0c1facb8365ad 100644 (file)
@@ -56,6 +56,10 @@ class QuoteTest(TestBase, AssertsCompiledSQL):
             '"25column" INTEGER'
             ')'
         )
+
+    @testing.crashes('mssql+mxodbc', """Invalid bind parameter placement:
+         'select ident_seed(?), ident_incr(?)' ('dbo.WorstCase2', 'dbo.WorstCase2')
+         """)
     def testreflect(self):
         meta2 = MetaData(testing.db)
         t2 = Table('WorstCase2', meta2, autoload=True, quote=True)
index 6404783a5a97f3cec38bcf6602867b2a066fdcb7..8c8ecd8f226c42022b4c2ee3b143ffad885b55b8 100644 (file)
@@ -813,7 +813,9 @@ class ExpressionTest(TestBase, AssertsExecutionResults, AssertsCompiledSQL):
         eq_(expr.right.type.__class__, CHAR)
         
         
-        
+    @testing.crashes('mssql+mxodbc', """Invalid bind parameter placement:
+        'SELECT test.bvalue + ? AS foo \nFROM test' ('BIND_INhi',)
+        """)
     @testing.fails_on('firebird', 'Data type unknown on the parameter')
     def test_operator_adapt(self):
         """test type-based overloading of operators"""
@@ -853,6 +855,9 @@ class ExpressionTest(TestBase, AssertsExecutionResults, AssertsCompiledSQL):
             "BIND_INfooBIND_INhiBIND_OUT"
         )
 
+    @testing.crashes('mssql+mxodbc', """Invalid bind parameter placement:
+       'SELECT test.bvalue + ? AS foo \nFROM test' ('BIND_IN6',)
+       """)
     def test_typedec_righthand_coercion(self):
         class MyTypeDec(types.TypeDecorator):
             impl = String