perform represenation of short paths at test execution site

This commit is contained in:
holger krekel 2010-11-13 23:33:38 +01:00
parent 82ba645a2e
commit 0323c5247f
2 changed files with 3 additions and 6 deletions

View File

@ -317,7 +317,8 @@ class Item(Node):
return self._location
except AttributeError:
location = self.reportinfo()
location = (str(location[0]), location[1], str(location[2]))
fspath = self.session.fspath.bestrelpath(location[0])
location = (fspath, location[1], str(location[2]))
self._location = location
return location

View File

@ -266,11 +266,7 @@ class TerminalReporter:
def _locationline(self, collect_fspath, fspath, lineno, domain):
if fspath and fspath != collect_fspath:
fspath = "%s <- %s" % (
self.curdir.bestrelpath(py.path.local(collect_fspath)),
self.curdir.bestrelpath(py.path.local(fspath)))
elif fspath:
fspath = self.curdir.bestrelpath(py.path.local(fspath))
fspath = "%s <- %s" % (collect_fspath, fspath)
if lineno is not None:
lineno += 1
if fspath and lineno and domain: