[py-svn] py-trunk commit f45d5a497d0d: defer compilation to frame.eval (pypy overrides frame.eval and has its own compilation

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Jun 10 09:49:20 CEST 2010


# HG changeset patch -- Bitbucket.org
# Project py-trunk
# URL http://bitbucket.org/hpk42/py-trunk/overview
# User holger krekel <holger at merlinux.eu>
# Date 1276156420 -7200
# Node ID f45d5a497d0d43bc31dcae3b6e2d66f736b66b28
# Parent  03efb9888f2689bfd53f70fcf4b15a14493b3d05
defer compilation to frame.eval (pypy overrides frame.eval and has its own compilation
of source code to bytecode)

--- a/py/_code/_assertionold.py
+++ b/py/_code/_assertionold.py
@@ -185,10 +185,9 @@ class Compare(Interpretable):
             expr2.eval(frame)
             self.explanation = "%s %s %s" % (
                 expr.explanation, operation, expr2.explanation)
-            co = compile("__exprinfo_left %s __exprinfo_right" % operation,
-                         '?', 'eval')
+            source = "__exprinfo_left %s __exprinfo_right" % operation
             try:
-                self.result = frame.eval(co, __exprinfo_left=expr.result,
+                self.result = frame.eval(source, __exprinfo_left=expr.result,
                                              __exprinfo_right=expr2.result)
             except passthroughex:
                 raise



More information about the pytest-commit mailing list