[pypy-svn] r40750 - in pypy/dist/pypy: interpreter/test module/recparser/test
afayolle at codespeak.net
afayolle at codespeak.net
Mon Mar 19 11:00:02 CET 2007
Author: afayolle
Date: Mon Mar 19 11:00:00 2007
New Revision: 40750
Modified:
pypy/dist/pypy/interpreter/test/test_compiler.py
pypy/dist/pypy/module/recparser/test/test_compilehooks.py
Log:
fixed tests broken by last friday's commit
(thanks arigo for the notice)
Modified: pypy/dist/pypy/interpreter/test/test_compiler.py
==============================================================================
--- pypy/dist/pypy/interpreter/test/test_compiler.py (original)
+++ pypy/dist/pypy/interpreter/test/test_compiler.py Mon Mar 19 11:00:00 2007
@@ -595,7 +595,7 @@
return parser.ASTConst(left.value + right.value)
return node
- def hook(ast, enc):
+ def hook(ast, enc, filename):
return ast.mutate(Folder())
parser.install_compiler_hook(hook)
Modified: pypy/dist/pypy/module/recparser/test/test_compilehooks.py
==============================================================================
--- pypy/dist/pypy/module/recparser/test/test_compilehooks.py (original)
+++ pypy/dist/pypy/module/recparser/test/test_compilehooks.py Mon Mar 19 11:00:00 2007
@@ -2,7 +2,7 @@
def test_basic_hook(self):
# define the hook
- def threebecomestwo(ast, enc):
+ def threebecomestwo(ast, enc, filename):
class ChangeConstVisitor:
def visitConst(self, node):
if node.value == 3:
@@ -28,14 +28,14 @@
assert d['a'] == 2 # well, yes ...
def test_removal_of_broken_hooks(self):
- def hook(ast, enc):
+ def hook(ast, enc, filename):
1/0
import parser
parser.install_compiler_hook(hook)
raises(ZeroDivisionError, "eval('1')")
assert eval("1") == 1
- def hook2(ast, enc):
+ def hook2(ast, enc, filename):
return 1
parser.install_compiler_hook(hook2)
raises(TypeError, "eval('2')")
@@ -46,7 +46,7 @@
class DISABLEDAppTest_GlobalsAsConsts:
def test_ast_parser(self):
# define the hook
- def change_globals(ast, enc):
+ def change_globals(ast, enc, filename):
class ChangeGlobalsVisitor:
def visitConst(self, node):
pass
More information about the Pypy-commit
mailing list