[pypy-svn] r34566 - pypy/dist/pypy/module/_sre/test
pedronis at codespeak.net
pedronis at codespeak.net
Mon Nov 13 15:56:29 CET 2006
Author: pedronis
Date: Mon Nov 13 15:56:27 2006
New Revision: 34566
Modified:
pypy/dist/pypy/module/_sre/test/test_app_sre.py
Log:
make module/_sre tests work with pypy-c py.test -A. One test is really failing with a MemoryError !? to investigate later.
Modified: pypy/dist/pypy/module/_sre/test/test_app_sre.py
==============================================================================
--- pypy/dist/pypy/module/_sre/test/test_app_sre.py (original)
+++ pypy/dist/pypy/module/_sre/test/test_app_sre.py Mon Nov 13 15:56:27 2006
@@ -2,7 +2,8 @@
from py.test import raises, skip
from pypy.interpreter.gateway import app2interp_temp
-def app_init_globals_hack():
+def init_globals_hack(space):
+ space.appexec([], """():
import __builtin__ as b
import sys, os.path
# Uh-oh, ugly hack
@@ -12,7 +13,7 @@
import support_test_app_sre
b.s = support_test_app_sre
sys.path.pop(0)
-
+ """)
class AppTestSrePy:
@@ -224,7 +225,7 @@
def setup_class(cls):
# This imports support_test_sre as the global "s"
- app2interp_temp(app_init_globals_hack)(cls.space)
+ init_globals_hack(cls.space)
def setup_method(self, method):
import locale
@@ -481,7 +482,7 @@
def setup_class(cls):
# This imports support_test_sre as the global "s"
- app2interp_temp(app_init_globals_hack)(cls.space)
+ init_globals_hack(cls.space)
def test_length_optimization(self):
pattern = "bla"
More information about the Pypy-commit
mailing list