]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fudge to make SQL asserts work reliably with MSSQL
authorPaul Johnston <paj@pajhome.org.uk>
Tue, 14 Aug 2007 18:16:27 +0000 (18:16 +0000)
committerPaul Johnston <paj@pajhome.org.uk>
Tue, 14 Aug 2007 18:16:27 +0000 (18:16 +0000)
test/testlib/testing.py

index 9ee201202156d2b85d90291ced061afe94bb71be..e56a1d36fcb28a885b33c6acbcb6d13b0a995b87 100644 (file)
@@ -258,6 +258,8 @@ class AssertMixin(PersistTest):
     def assert_sql(self, db, callable_, list, with_sequences=None):
         global testdata
         testdata = TestData()
+        if config.db.name == 'mssql':            
+            list = [s.endswith('; select scope_identity()') and s[:-25] or s for s in list]
         if with_sequences is not None and (config.db.name == 'postgres' or
                                            config.db.name == 'oracle'):
             testdata.set_assert_list(self, with_sequences)