[Pytest-commit] commit/pytest: hpk42: show more info if the test fails
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Sep 5 22:22:22 CEST 2013
1 new commit in pytest:
https://bitbucket.org/hpk42/pytest/commits/3e3e5213be60/
Changeset: 3e3e5213be60
User: hpk42
Date: 2013-09-05 22:22:14
Summary: show more info if the test fails
Affected #: 1 file
diff -r 024def3ca24fabc6fcf2176871d40acd49d4f32e -r 3e3e5213be60c60131b8051805946a8f0822fb58 testing/test_runner.py
--- a/testing/test_runner.py
+++ b/testing/test_runner.py
@@ -185,7 +185,10 @@
# 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)
""")
Repository URL: https://bitbucket.org/hpk42/pytest/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the pytest-commit
mailing list