fix issue 188 - ensure sys.exc_info on py2 is clear before calling into a test

This commit is contained in:
Ronny Pfannschmidt
2012-09-15 15:20:49 +02:00
parent bfaf8e50b6
commit bf5b226474
3 changed files with 19 additions and 4 deletions

View File

@@ -180,7 +180,12 @@ class BaseFunctionalTests:
raise Exception()
def test_func():
pass
import sys
# on python2 exc_info is keept till a function exits
# 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
def teardown_function(func):
raise ValueError(42)
""")