]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Marked mssql test as failing since it cannot update identity columns.
authorMichael Trier <mtrier@gmail.com>
Fri, 2 Jan 2009 18:25:08 +0000 (18:25 +0000)
committerMichael Trier <mtrier@gmail.com>
Fri, 2 Jan 2009 18:25:08 +0000 (18:25 +0000)
lib/sqlalchemy/databases/mssql.py
test/orm/mapper.py

index 963b0e5fec43c12e765eb549fb0ebc0cb095c6c0..60eb0dfe16451774a2e07c4cef7da8cdefa20f09 100644 (file)
@@ -790,7 +790,6 @@ class MSSQLExecutionContext(default.DefaultExecutionContext):
 
         if self.compiled.isinsert:
             tbl = self.compiled.statement.table
-            
             seq_column = _table_sequence_column(tbl)
             self.HASIDENT = bool(seq_column)
             if self.dialect.auto_identity_insert and self.HASIDENT:
index 5cab84175e13d04d33b6b8768fcc4d92c28503ae..d486c3b041fe861e7f771c60b348d43b07ed7be2 100644 (file)
@@ -1791,11 +1791,14 @@ class CompositeTypesTest(_base.MappedTest):
         eq_(g.version, g2.version)
 
         # test pk mutation
-        g2.version = Version(2, 1)
-        sess.flush()
-        g3 = sess.query(Graph).get(Version(2, 1))
-        eq_(g2.version, g3.version)
-        
+        @testing.fails_on('mssql', 'Cannot update identity columns.')
+        def update_pk():
+            g2.version = Version(2, 1)
+            sess.flush()
+            g3 = sess.query(Graph).get(Version(2, 1))
+            eq_(g2.version, g3.version)
+        update_pk()
+
         # test pk with one column NULL
         # TODO: can't seem to get NULL in for a PK value
         # in either mysql or postgres, autoincrement=False etc.