[py-svn] r51650 - in py/branch/event/py/test2: . testing
hpk at codespeak.net
hpk at codespeak.net
Tue Feb 19 19:11:13 CET 2008
Author: hpk
Date: Tue Feb 19 19:11:13 2008
New Revision: 51650
Modified:
py/branch/event/py/test2/item.py
py/branch/event/py/test2/testing/test_present.py
Log:
don't print generated test info with full tracebacks
Modified: py/branch/event/py/test2/item.py
==============================================================================
--- py/branch/event/py/test2/item.py (original)
+++ py/branch/event/py/test2/item.py Tue Feb 19 19:11:13 2008
@@ -71,10 +71,11 @@
p.repr_failure_headline(self)
p.out.line("")
if self.name[-1] == "]": # generated test has trailing [num]
- args = present.safe_repr._repr(self._args)
- line = "%s%s -> %s%s" %(self.parent.name, self.name,
- self.obj.__name__, args)
- p.out.line(line)
+ if not self._config.option.fulltrace:
+ args = present.safe_repr._repr(self._args)
+ line = "%s%s -> %s%s" %(self.parent.name, self.name,
+ self.obj.__name__, args)
+ p.out.line(line)
p.repr_tb(self, excinfo)
return p.stringio.getvalue()
Modified: py/branch/event/py/test2/testing/test_present.py
==============================================================================
--- py/branch/event/py/test2/testing/test_present.py (original)
+++ py/branch/event/py/test2/testing/test_present.py Tue Feb 19 19:11:13 2008
@@ -156,5 +156,9 @@
lines = s.split("\n")
assert lines[2].find("test_gen[0] -> check(0,)") != -1
assert lines[3].find("def check(x):") != -1
+ item._config.option.fulltrace = True
+ s = item.repr_failure(excinfo)
+ lines = s.split("\n")
+ assert lines[2].find("test_gen[0] -> check(0,)") == -1
More information about the py-svn
mailing list