MCPcopy Create free account
hub / github.com/EasyIME/PIME / test_empty_iterator

Method test_empty_iterator

python/python3/tornado/test/gen_test.py:799–807  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

797class WaitIteratorTest(AsyncTestCase):
798 @gen_test
799 def test_empty_iterator(self):
800 g = gen.WaitIterator()
801 self.assertTrue(g.done(), "empty generator iterated")
802
803 with self.assertRaises(ValueError):
804 g = gen.WaitIterator(Future(), bar=Future())
805
806 self.assertEqual(g.current_index, None, "bad nil current index")
807 self.assertEqual(g.current_future, None, "bad nil current future")
808
809 @gen_test
810 def test_already_done(self):

Callers

nothing calls this directly

Calls 1

doneMethod · 0.95

Tested by

no test coverage detected