summaryrefslogtreecommitdiff
path: root/test/testlib/testing.py
diff options
context:
space:
mode:
authorPaul Johnston <paj@pajhome.org.uk>2007-08-19 15:30:02 +0000
committerPaul Johnston <paj@pajhome.org.uk>2007-08-19 15:30:02 +0000
commit1b1da969ebe582c4831c298dfa27e87719b1f329 (patch)
tree56d1eaada67cc22fc9849ce9bd03c00e9604d92a /test/testlib/testing.py
parent53ff3d297caf084f7e4a8d03d9f2e8b3bacd0565 (diff)
downloadsqlalchemy-1b1da969ebe582c4831c298dfa27e87719b1f329.tar.gz
mssql unit test fixes
Diffstat (limited to 'test/testlib/testing.py')
-rw-r--r--test/testlib/testing.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/testlib/testing.py b/test/testlib/testing.py
index 58fd7c0d1..0038fddfe 100644
--- a/test/testlib/testing.py
+++ b/test/testlib/testing.py
@@ -128,6 +128,8 @@ class ExecutionContextWrapper(object):
ctx = self.ctx
statement = unicode(ctx.compiled)
statement = re.sub(r'\n', '', ctx.statement)
+ if config.db.name == 'mssql' and statement.endswith('; select scope_identity()'):
+ statement = statement[:-25]
if testdata.buffer is not None:
testdata.buffer.write(statement + "\n")
@@ -168,8 +170,6 @@ class ExecutionContextWrapper(object):
parameters = [p.get_original_dict() for p in ctx.compiled_parameters]
query = self.convert_statement(query)
- if config.db.name == 'mssql' and statement.endswith('; select scope_identity()'):
- statement = statement[:-25]
testdata.unittest.assert_(statement == query and (params is None or params == parameters), "Testing for query '%s' params %s, received '%s' with params %s" % (query, repr(params), statement, repr(parameters)))
testdata.sql_count += 1
self.ctx.post_execution()