fix some standalone-script running issues:
* standalone can run standalone tests * exception handling is more careful with assuming valid filenames * bits here and there --HG-- branch : trunk
This commit is contained in:
@@ -537,8 +537,9 @@ class FormattedExcinfo(object):
|
||||
else:
|
||||
if self.style == "short":
|
||||
line = source[line_index].lstrip()
|
||||
trybasename = getattr(entry.path, 'basename', entry.path)
|
||||
lines.append(' File "%s", line %d, in %s' % (
|
||||
entry.path.basename, entry.lineno+1, entry.name))
|
||||
trybasename, entry.lineno+1, entry.name))
|
||||
lines.append(" " + line)
|
||||
if excinfo:
|
||||
lines.extend(self.get_exconly(excinfo, indent=4))
|
||||
|
||||
Reference in New Issue
Block a user