show more info if the test fails

This commit is contained in:
holger krekel 2013-09-05 22:22:14 +02:00
parent 517d498285
commit c3fcf4d928
1 changed files with 4 additions and 1 deletions

View File

@ -185,7 +185,10 @@ class BaseFunctionalTests:
# so we would end up calling test functions while
# sys.exc_info would return the indexerror
# from guessing the lastitem
assert sys.exc_info()[0] is None
excinfo = sys.exc_info()
import traceback
assert excinfo[0] is None, \
traceback.format_exception(*excinfo)
def teardown_function(func):
raise ValueError(42)
""")