[svn r58090] Add a hack with a comment that explains why I think it is a hack.

I fear I don't care enough about --tb=short to do the "proper" fix
as documented in the comment.

--HG--
branch : trunk
This commit is contained in:
arigo 2008-09-12 21:16:34 +02:00
parent 53220afc60
commit 2742204d67
1 changed files with 8 additions and 1 deletions

View File

@ -268,9 +268,16 @@ class Node(object):
def _repr_failure_py(self, excinfo, outerr):
excinfo.traceback = self._prunetraceback(excinfo.traceback)
# XXX temporary hack: getrepr() should not take a 'style' argument
# at all; it should record all data in all cases, and the style
# should be parametrized in toterminal().
if self._config.option.tbstyle == "short":
style = "short"
else:
style = "long"
repr = excinfo.getrepr(funcargs=True,
showlocals=self._config.option.showlocals,
style=self._config.option.tbstyle)
style=style)
for secname, content in zip(["out", "err"], outerr):
if content:
repr.addsection("Captured std%s" % secname, content.rstrip())