[pypy-svn] r39696 - in pypy/dist/pypy: objspace/flow/test rlib rlib/rsre rlib/rsre/test rlib/test

hpk at codespeak.net hpk at codespeak.net
Fri Mar 2 16:01:01 CET 2007


Author: hpk
Date: Fri Mar  2 16:00:58 2007
New Revision: 39696

Removed:
   pypy/dist/pypy/objspace/flow/test/autopath.py
   pypy/dist/pypy/rlib/autopath.py
   pypy/dist/pypy/rlib/rsre/autopath.py
   pypy/dist/pypy/rlib/rsre/test/autopath.py
   pypy/dist/pypy/rlib/test/autopath.py
Modified:
   pypy/dist/pypy/objspace/flow/test/test_framestate.py
   pypy/dist/pypy/objspace/flow/test/test_model.py
   pypy/dist/pypy/objspace/flow/test/test_objspace.py
   pypy/dist/pypy/rlib/rsre/rsre.py
   pypy/dist/pypy/rlib/rsre/test/test_rsre.py
   pypy/dist/pypy/rlib/test/test_listsort.py
Log:
remove more autopath 


Modified: pypy/dist/pypy/objspace/flow/test/test_framestate.py
==============================================================================
--- pypy/dist/pypy/objspace/flow/test/test_framestate.py	(original)
+++ pypy/dist/pypy/objspace/flow/test/test_framestate.py	Fri Mar  2 16:00:58 2007
@@ -1,5 +1,4 @@
 
-import autopath
 
 from py.test import raises
 from pypy.objspace.flow.model import *

Modified: pypy/dist/pypy/objspace/flow/test/test_model.py
==============================================================================
--- pypy/dist/pypy/objspace/flow/test/test_model.py	(original)
+++ pypy/dist/pypy/objspace/flow/test/test_model.py	Fri Mar  2 16:00:58 2007
@@ -1,4 +1,4 @@
-import autopath, inspect
+import inspect
 
 from pypy.objspace.flow.model import *
 

Modified: pypy/dist/pypy/objspace/flow/test/test_objspace.py
==============================================================================
--- pypy/dist/pypy/objspace/flow/test/test_objspace.py	(original)
+++ pypy/dist/pypy/objspace/flow/test/test_objspace.py	Fri Mar  2 16:00:58 2007
@@ -1,4 +1,3 @@
-import autopath
 import py
 from pypy.objspace.flow.model import Constant, Block, Link, Variable, traverse
 from pypy.objspace.flow.model import flatten

Modified: pypy/dist/pypy/rlib/rsre/rsre.py
==============================================================================
--- pypy/dist/pypy/rlib/rsre/rsre.py	(original)
+++ pypy/dist/pypy/rlib/rsre/rsre.py	Fri Mar  2 16:00:58 2007
@@ -1,4 +1,3 @@
-import autopath
 import os, sys, new
 
 # WARNING: this is all nicely RPython, but there is no RPython code around
@@ -7,6 +6,12 @@
 #
 # XXX However it's not even clear how to get such prebuilt regexps...
 
+import rsre_core
+rsre_core_filename = rsre_core.__file__
+if rsre_core_filename[-1] in 'oc':
+    rsre_core_filename = rsre_core_filename[:-1]
+rsre_core_filename = os.path.abspath(rsre_core_filename)
+del rsre_core
 
 def insert_sre_methods(locals, name):
     """A hack that inserts the SRE entry point methods into the 'locals'
@@ -19,7 +24,7 @@
         start           - start position for searching and matching
         end             - end position for searching and matching
     """
-    filename = os.path.join(autopath.this_dir, 'rsre_core.py')
+    filename = rsre_core_filename 
     rsre_core = new.module('pypy.rlib.rsre.rsre_core_' + name)
     rsre_core.__file__ = filename
     execfile(filename, rsre_core.__dict__)

Modified: pypy/dist/pypy/rlib/rsre/test/test_rsre.py
==============================================================================
--- pypy/dist/pypy/rlib/rsre/test/test_rsre.py	(original)
+++ pypy/dist/pypy/rlib/rsre/test/test_rsre.py	Fri Mar  2 16:00:58 2007
@@ -1,5 +1,4 @@
 """Interp-level rsre tests."""
-import autopath
 import sys
 from py.test import raises
 from pypy.rlib.rsre.rsre import SimpleStringState, set_unicode_db

Modified: pypy/dist/pypy/rlib/test/test_listsort.py
==============================================================================
--- pypy/dist/pypy/rlib/test/test_listsort.py	(original)
+++ pypy/dist/pypy/rlib/test/test_listsort.py	Fri Mar  2 16:00:58 2007
@@ -1,4 +1,4 @@
-import autopath
+import py
 from pypy.rlib.listsort import TimSort
 import random, os
 
@@ -35,9 +35,7 @@
         sorttest(lst1)
 
 def test_file():
-    for fn in os.listdir(autopath.this_dir):
-        if fn.endswith('.py'):
-            f = open(os.path.join(autopath.this_dir, fn), 'r')
-            lines1 = f.readlines()
-            f.close()
+    for fn in py.magic.autopath().dirpath().listdir():
+        if fn.ext == '.py': 
+            lines1 = fn.readlines()
             sorttest(lines1)



More information about the Pypy-commit mailing list