[pypy-svn] pypy default: fix this test... if anyone wants to use it

gutworth commits-noreply at bitbucket.org
Tue Jan 18 01:29:17 CET 2011


Author: Benjamin Peterson <benjamin at python.org>
Branch: 
Changeset: r40825:a53ab39370bf
Date: 2011-01-17 18:28 -0600
http://bitbucket.org/pypy/pypy/changeset/a53ab39370bf/

Log:	fix this test... if anyone wants to use it

diff --git a/pypy/interpreter/astcompiler/test/stdlib_testall.py b/pypy/interpreter/astcompiler/test/stdlib_testall.py
--- a/pypy/interpreter/astcompiler/test/stdlib_testall.py
+++ b/pypy/interpreter/astcompiler/test/stdlib_testall.py
@@ -1,17 +1,19 @@
-from pypy.toolautopath import libpythondir
 import py
-from pypy.interpreter.astcompiler.test.test_compiler import \
-        compile_with_astcompiler
+from pypy.interpreter.astcompiler.test.test_compiler import compile_with_astcompiler
 
 class TestStdlib:
 
     def check_file_compile(self, filepath):
         space = self.space
-        print 'Compiling:', filepath 
-        source = filepath.read() 
+        print 'Compiling:', filepath
+        source = filepath.read()
         compile_with_astcompiler(source, mode='exec', space=space)
 
     def test_all(self):
+        space = self.space
+        libpythondir = space.str_w(space.appexec((), """():
+        import os
+        return os.path.dirname(os.__file__)"""))
         p = py.path.local(libpythondir)
         files = p.listdir("*.py")
         files.sort()


More information about the Pypy-commit mailing list