def test_store_except_info_on_eror():
 class ItemThatRaises:
  def runtest(self):
   raise IndexError('TEST')
 try:
  runner.pytest_runtest_call(ItemThatRaises())
 except IndexError:
  pass
 assert (sys.last_type is IndexError)
 assert (sys.last_value.args[0] == 'TEST')
 assert sys.last_traceback

def test_store_except_info_on_eror ( ) : class ItemThatRaises : def runtest ( self ) : raise IndexError ( 'TEST' ) try : runner . pytest_runtest_call ( ItemThatRaises ( ) ) except IndexError : pass assert ( sys . last_type is IndexError ) assert ( sys . last_value . args [ 0 ] == 'TEST' ) assert sys . last_traceback
test that upon test failure .