[pypy-svn] r16192 - pypy/dist/lib-python

hpk at codespeak.net hpk at codespeak.net
Mon Aug 22 13:11:01 CEST 2005


Author: hpk
Date: Mon Aug 22 13:11:00 2005
New Revision: 16192

Modified:
   pypy/dist/lib-python/conftest.py
Log:
be more careful about if os.path.samefile() exists
for the warning of being in the wrong directory
running tests. 



Modified: pypy/dist/lib-python/conftest.py
==============================================================================
--- pypy/dist/lib-python/conftest.py	(original)
+++ pypy/dist/lib-python/conftest.py	Mon Aug 22 13:11:00 2005
@@ -968,7 +968,9 @@
 # Sanity check  (could be done more nicely too)
 #
 import os
-if os.path.samefile(os.getcwd(), str(regrtestdir.dirpath())):
+samefile = getattr(os.path, 'samefile', 
+                   lambda x,y : str(x) == str(y))
+if samefile(os.getcwd(), str(regrtestdir.dirpath())):
     raise NotImplementedError(
         "Cannot run py.test with this current directory:\n"
         "the app-level sys.path will contain %s before %s)." % (



More information about the Pypy-commit mailing list