[pypy-svn] r11746 - pypy/dist/pypy/interpreter/test

arigo at codespeak.net arigo at codespeak.net
Mon May 2 00:25:42 CEST 2005


Author: arigo
Date: Mon May  2 00:25:41 2005
New Revision: 11746

Modified:
   pypy/dist/pypy/interpreter/test/test_exec.py
Log:
Bad idea to try to 'exec' ourselves at app-level.


Modified: pypy/dist/pypy/interpreter/test/test_exec.py
==============================================================================
--- pypy/dist/pypy/interpreter/test/test_exec.py	(original)
+++ pypy/dist/pypy/interpreter/test/test_exec.py	Mon May  2 00:25:41 2005
@@ -3,15 +3,19 @@
 New for PyPy - Could be incorporated into CPython regression tests.
 """
 import autopath
+from pypy.tool.udir import udir
 
 
 def test_file(space):
-    space.appexec([space.wrap(__file__)], '''
+    fn = udir.join('test_exec_file')
+    fn.write('abc=1\ncba=2\n')
+    space.appexec([space.wrap(str(fn))], '''
         (filename):
             fo = open(filename, 'r')
             g = {}
             exec fo in g
-            assert 'test_file' in g
+            assert 'abc' in g
+            assert 'cba' in g
     ''')
 
 



More information about the Pypy-commit mailing list