[pypy-svn] rev 518 - pypy/trunk/src/pypy/interpreter/test

alex at codespeak.net alex at codespeak.net
Tue May 27 12:30:35 CEST 2003


Author: alex
Date: Tue May 27 12:30:35 2003
New Revision: 518

Modified:
   pypy/trunk/src/pypy/interpreter/test/test_builtins.py
Log:
last few mods (incomplete) before deletion



Modified: pypy/trunk/src/pypy/interpreter/test/test_builtins.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/test/test_builtins.py	(original)
+++ pypy/trunk/src/pypy/interpreter/test/test_builtins.py	Tue May 27 12:30:35 2003
@@ -1,23 +1,22 @@
-# XXX fixme:
-# This test is out of date and not functioning.
+import testsupport
 
-import unittest, sys, os
-sys.path.insert(0, '..')
+# need pypy.module.builtin first to make other imports work (???)
+import pypy.module.builtin
 
-from pyframe import PyFrame
-import pypy.objspace.trivial as trivialspace
+from pypy.interpreter.pyframe import PyFrame
 
 def make_builtins_global():
         d = {}
         exec '''def filter(a, b): return 42''' in d 
         return d
 
-class TestBuiltins(unittest.TestCase):
+class TestBuiltins(testsupport.TestCase):
 
     def test_filter_None(self):
         # build frame
-        space = trivialspace
-        bytecode = compile("def f(x): return filter(None, [1, '', 2])", '', 'exec').co_consts[0]
+        space = testsupport.objspace()
+        bytecode = compile("def f(x): return filter(None, [1, '', 2])",
+            '', 'exec').co_consts[0]
         d = make_builtins_global()
         w_globals = space.wrap(d)
         w_locals = space.wrap({})
@@ -31,4 +30,4 @@
         
 
 if __name__ == '__main__':
-    unittest.main()
+    testsupport.main()


More information about the Pypy-commit mailing list