def METHOD_NAME(self):
    genexp = (i for i in range(2))
    self.assertRaises(IOError, genexp.throw, IOError)
    self.assertEqual(genexp.gi_frame, None)
    self.assertRaises(StopIteration, genexp.next)