[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:
parent
53220afc60
commit
2742204d67
|
@ -268,9 +268,16 @@ class Node(object):
|
||||||
|
|
||||||
def _repr_failure_py(self, excinfo, outerr):
|
def _repr_failure_py(self, excinfo, outerr):
|
||||||
excinfo.traceback = self._prunetraceback(excinfo.traceback)
|
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,
|
repr = excinfo.getrepr(funcargs=True,
|
||||||
showlocals=self._config.option.showlocals,
|
showlocals=self._config.option.showlocals,
|
||||||
style=self._config.option.tbstyle)
|
style=style)
|
||||||
for secname, content in zip(["out", "err"], outerr):
|
for secname, content in zip(["out", "err"], outerr):
|
||||||
if content:
|
if content:
|
||||||
repr.addsection("Captured std%s" % secname, content.rstrip())
|
repr.addsection("Captured std%s" % secname, content.rstrip())
|
||||||
|
|
Loading…
Reference in New Issue