[pypy-svn] r61241 - pypy/trunk/lib-python/modified-2.5.2/test

arigo at codespeak.net arigo at codespeak.net
Thu Jan 22 16:06:08 CET 2009


Author: arigo
Date: Thu Jan 22 16:06:08 2009
New Revision: 61241

Added:
   pypy/trunk/lib-python/modified-2.5.2/test/regrtest.py
      - copied, changed from r61240, pypy/trunk/lib-python/2.5.2/test/regrtest.py
Log:
Fix for the 'trace' mode of regrtest.py


Copied: pypy/trunk/lib-python/modified-2.5.2/test/regrtest.py (from r61240, pypy/trunk/lib-python/2.5.2/test/regrtest.py)
==============================================================================
--- pypy/trunk/lib-python/2.5.2/test/regrtest.py	(original)
+++ pypy/trunk/lib-python/modified-2.5.2/test/regrtest.py	Thu Jan 22 16:06:08 2009
@@ -348,8 +348,11 @@
         random.shuffle(tests)
     if trace:
         import trace
-        tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix],
-                             trace=False, count=True)
+        if hasattr(sys, 'prefix'):
+            ignoredirs = [sys.prefix, sys.exec_prefix]
+        else:
+            ignoredirs = [sys.pypy_prefix]     # PyPy only
+        tracer = trace.Trace(ignoredirs=ignoredirs, trace=False, count=True)
     test_support.verbose = verbose      # Tell tests to be moderately quiet
     test_support.use_resources = use_resources
     save_modules = sys.modules.keys()



More information about the Pypy-commit mailing list