def test_exception():
 stack = Stack()
 stack.push(1)
 assert (1 == stack.pop())
 try:
  stack.pop()
 except ValueError as e:
  assert ('empty' == str(e))

def test_exception ( ) : stack = Stack ( ) stack . push ( 1 ) assert ( 1 == stack . pop ( ) ) try : stack . pop ( ) except ValueError as e : assert ( 'empty' == str ( e ) )
test exception raised from a jit method .