[pypy-svn] r17482 - pypy/dist/pypy/interpreter/pyparser/test
pedronis at codespeak.net
pedronis at codespeak.net
Mon Sep 12 00:44:55 CEST 2005
Author: pedronis
Date: Mon Sep 12 00:44:53 2005
New Revision: 17482
Modified:
pypy/dist/pypy/interpreter/pyparser/test/stdlib_testall.py
pypy/dist/pypy/interpreter/pyparser/test/test_astcompiler.py
Log:
use std object space for stdlib_testall too
Modified: pypy/dist/pypy/interpreter/pyparser/test/stdlib_testall.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyparser/test/stdlib_testall.py (original)
+++ pypy/dist/pypy/interpreter/pyparser/test/stdlib_testall.py Mon Sep 12 00:44:53 2005
@@ -2,11 +2,17 @@
import py
from test_astcompiler import check_compile
+def setup_module(mod):
+ import sys
+ if sys.version[:3] != "2.4":
+ py.test.skip("expected to work only on 2.4")
+ import pypy.conftest
+ mod.std_space = pypy.conftest.getobjspace('std')
def check_file_compile(filename):
print 'Compiling:', filename
source = open(filename).read()
- check_compile(source, 'exec', quiet=True)
+ check_compile(source, 'exec', quiet=True, space=std_space)
def test_all():
Modified: pypy/dist/pypy/interpreter/pyparser/test/test_astcompiler.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyparser/test/test_astcompiler.py (original)
+++ pypy/dist/pypy/interpreter/pyparser/test/test_astcompiler.py Mon Sep 12 00:44:53 2005
@@ -134,11 +134,12 @@
tuple(rcode.co_cellvars) )
return code
-def check_compile(expr, target='exec', quiet=False, space=FakeSpace()):
+def check_compile(expr, target='exec', quiet=False, space=None):
if not quiet:
print "Compiling:", expr
- space = std_space
+ if space is None:
+ space = std_space
sc_code = compile_with_stablecompiler(expr, target=target)
ac_code = compile_with_astcompiler(expr, target=target, space=space)
More information about the Pypy-commit
mailing list