perform represenation of short paths at test execution site
This commit is contained in:
parent
82ba645a2e
commit
0323c5247f
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue