[pypy-svn] pypy merge-stdlib: Removed some additional modified- references.

carljm commits-noreply at bitbucket.org
Mon Mar 14 04:19:18 CET 2011


Author: Carl Meyer <carl at oddbird.net>
Branch: merge-stdlib
Changeset: r42593:52db46c411ae
Date: 2011-03-13 23:09 -0400
http://bitbucket.org/pypy/pypy/changeset/52db46c411ae/

Log:	Removed some additional modified- references.

diff --git a/lib-python/conftest.py b/lib-python/conftest.py
--- a/lib-python/conftest.py
+++ b/lib-python/conftest.py
@@ -18,7 +18,7 @@
 
 from pypy.tool.pytest import appsupport 
 from pypy.tool.pytest.confpath import pypydir, libpythondir, \
-                                      regrtestdir, modregrtestdir, testresultdir
+                                      regrtestdir, testresultdir
 
 pytest_plugins = "resultlog",
 rsyncdirs = ['.', '../pypy/']
@@ -75,13 +75,7 @@
         return self._compiler #or pypy_option.compiler 
     compiler = property(compiler)
 
-    def ismodified(self): 
-        return modregrtestdir.join(self.basename).check() 
-
     def getfspath(self): 
-        fn = modregrtestdir.join(self.basename)
-        if fn.check(): 
-            return fn 
         fn = regrtestdir.join(self.basename)
         return fn 
 
@@ -546,7 +540,7 @@
     regrtest = parent.config._basename2spec.get(path.basename, None)
     if regrtest is None:
         return
-    if path.dirpath() not in (modregrtestdir, regrtestdir):
+    if path.dirpath() != regrtestdir:
         return
     return RunFileExternal(path.basename, parent=parent, regrtest=regrtest)
 
@@ -557,11 +551,7 @@
         self.fspath = regrtest.getfspath()
 
     def collect(self): 
-        if self.regrtest.ismodified(): 
-            name = 'modified'
-        else:
-            name = 'unmodified'
-        return [ReallyRunFileExternal(name, parent=self)] 
+        return [ReallyRunFileExternal("module", parent=self)] 
 
 #
 # testmethod: 
@@ -711,15 +701,3 @@
         if regrtest.core:
             lst.append('core')
         return lst
-
-#
-# Sanity check  (could be done more nicely too)
-#
-import os
-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)." % (
-            regrtestdir.dirpath(), modregrtestdir.dirpath()))

diff --git a/pypy/tool/pytest/result.py b/pypy/tool/pytest/result.py
--- a/pypy/tool/pytest/result.py
+++ b/pypy/tool/pytest/result.py
@@ -173,10 +173,6 @@
                     unicode(content, candidate) 
                 self.addnamedtext(fn, text) 
 
-    def ismodifiedtest(self): 
-        # XXX we need proper cross-platform paths! 
-        return 'modified' in self.fspath
-
     def __repr__(self): 
         return '<%s (%s) %r rev=%s>' %(self.__class__.__name__, 
                                   self['outcome'], 

diff --git a/pypy/tool/pytest/htmlreport.py b/pypy/tool/pytest/htmlreport.py
--- a/pypy/tool/pytest/htmlreport.py
+++ b/pypy/tool/pytest/htmlreport.py
@@ -75,8 +75,7 @@
 
     def render_test_references(self, result): 
         dest = self.make_single_test_result(result)
-        modified = result.ismodifiedtest() and " [mod]" or ""
-        return html.div(html.a(result.path.purebasename + modified, 
+        return html.div(html.a(result.path.purebasename, 
                       href=self.getrelpath(dest)),
                       style="background-color: transparent")
 


More information about the Pypy-commit mailing list