From: Paul Johnston Date: Tue, 14 Aug 2007 18:16:27 +0000 (+0000) Subject: fudge to make SQL asserts work reliably with MSSQL X-Git-Tag: rel_0_4beta3~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0e78b044e795888baa3718a654c34f5744ca344;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git fudge to make SQL asserts work reliably with MSSQL --- diff --git a/test/testlib/testing.py b/test/testlib/testing.py index 9ee2012021..e56a1d36fc 100644 --- a/test/testlib/testing.py +++ b/test/testlib/testing.py @@ -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)