From 2742204d672b4826994563799b01f940b7f282a4 Mon Sep 17 00:00:00 2001 From: arigo Date: Fri, 12 Sep 2008 21:16:34 +0200 Subject: [PATCH] [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 --- py/test/collect.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/py/test/collect.py b/py/test/collect.py index e0a0fc777..db6d67d87 100644 --- a/py/test/collect.py +++ b/py/test/collect.py @@ -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())