[pypy-svn] r50500 - pypy/branch/astcompilertests/pypy/interpreter/astcompiler/test

arigo at codespeak.net arigo at codespeak.net
Thu Jan 10 22:39:50 CET 2008


Author: arigo
Date: Thu Jan 10 22:39:49 2008
New Revision: 50500

Modified:
   pypy/branch/astcompilertests/pypy/interpreter/astcompiler/test/stdlib_testall.py
Log:
Fix imports.


Modified: pypy/branch/astcompilertests/pypy/interpreter/astcompiler/test/stdlib_testall.py
==============================================================================
--- pypy/branch/astcompilertests/pypy/interpreter/astcompiler/test/stdlib_testall.py	(original)
+++ pypy/branch/astcompilertests/pypy/interpreter/astcompiler/test/stdlib_testall.py	Thu Jan 10 22:39:49 2008
@@ -1,21 +1,18 @@
 import pypy 
 import py
-from test_astcompiler import compile_with_astcompiler
+from pypy.interpreter.astcompiler.test.test_compiler import \
+        compile_with_astcompiler
 
-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.gettestobjspace('std')
+class TestStdlib:
 
-def check_file_compile(filepath):
-    print 'Compiling:', filepath 
-    source = filepath.read() 
-    #check_compile(source, 'exec', quiet=True, space=std_space)
-    compile_with_astcompiler(source, mode='exec', space=std_space)
+    def check_file_compile(self, filepath):
+        space = self.space
+        print 'Compiling:', filepath 
+        source = filepath.read() 
+        compile_with_astcompiler(source, mode='exec', space=space)
 
-def test_all():
-    p = py.path.local(pypy.__file__).dirpath().dirpath('lib-python', '2.4.1')
-    for s in p.listdir("*.py"): 
-        yield check_file_compile, s 
+    def test_all(self):
+        p = py.path.local(pypy.__file__).dirpath().dirpath('lib-python',
+                                                           '2.4.1')
+        for s in p.listdir("*.py"):
+            yield self.check_file_compile, s



More information about the Pypy-commit mailing list