[py-svn] r58090 - py/trunk/py/test
arigo at codespeak.net
arigo at codespeak.net
Fri Sep 12 21:16:38 CEST 2008
Author: arigo
Date: Fri Sep 12 21:16:34 2008
New Revision: 58090
Modified:
py/trunk/py/test/collect.py
Log:
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.
Modified: py/trunk/py/test/collect.py
==============================================================================
--- py/trunk/py/test/collect.py (original)
+++ py/trunk/py/test/collect.py Fri Sep 12 21:16:34 2008
@@ -268,9 +268,16 @@
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())
More information about the pytest-commit
mailing list