diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-08-28 11:29:07 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-08-28 11:29:07 -0400 |
commit | a635750213c346a895e417ae8e629ce924d557e8 (patch) | |
tree | aef5029e2ffa1b7867efdf0fbfcdf03948fec0ed /lib/sqlalchemy/test/assertsql.py | |
parent | 63c1800c568824b6828ac791f83fd2bf7626adcc (diff) | |
download | sqlalchemy-a635750213c346a895e417ae8e629ce924d557e8.tar.gz |
going back to the simple way, plus trying to make the engine thing simpler, and....doesn't work.
on_before_execute and on_after_execute really not appealing here. might have to just go back to
what it was the other day.
Diffstat (limited to 'lib/sqlalchemy/test/assertsql.py')
-rw-r--r-- | lib/sqlalchemy/test/assertsql.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/sqlalchemy/test/assertsql.py b/lib/sqlalchemy/test/assertsql.py index a389c81f8..11ad20e77 100644 --- a/lib/sqlalchemy/test/assertsql.py +++ b/lib/sqlalchemy/test/assertsql.py @@ -175,6 +175,10 @@ class CompiledSQL(SQLMatchRule): self._result = equivalent if not self._result: + print "Testing for compiled statement %r partial params %r, " \ + "received %r with params %r" % \ + (self.statement, all_params, _received_statement, all_received) + self._errmsg = "Testing for compiled statement %r partial params %r, " \ "received %r with params %r" % \ (self.statement, all_params, _received_statement, all_received) @@ -269,9 +273,10 @@ class SQLAssert(object): def clear_rules(self): del self.rules - def execute(self, conn, execute, clauseelement, *multiparams, **params): - result = execute(clauseelement, *multiparams, **params) - + def execute(self, conn, clauseelement, *multiparams, **params): + # TODO: this doesn't work. we need to execute before so that we know + # what's happened with the parameters. + if self.rules is not None: if not self.rules: assert False, "All rules have been exhausted, but further statements remain" @@ -280,16 +285,12 @@ class SQLAssert(object): if rule.is_consumed(): self.rules.pop(0) - return result - - def cursor_execute(self, conn, execute, cursor, statement, parameters, context, executemany): - result = execute(cursor, statement, parameters, context, executemany) + def cursor_execute(self, conn, cursor, statement, parameters, context, executemany): + print "RECEIVE !", statement, parameters if self.rules: rule = self.rules[0] rule.process_cursor_execute(statement, parameters, context, executemany) - return result - asserter = SQLAssert() |