MCPcopy Index your code
hub / github.com/python/cpython / test_initial_state

Method test_initial_state

Lib/test/test_asyncio/test_futures.py:161–166  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

159 f.cancel()
160
161 def test_initial_state(self):
162 f = self._new_future(loop=self.loop)
163 self.assertFalse(f.cancelled())
164 self.assertFalse(f.done())
165 f.cancel()
166 self.assertTrue(f.cancelled())
167
168 def test_constructor_without_loop(self):
169 with self.assertRaisesRegex(RuntimeError, 'no current event loop'):

Callers

nothing calls this directly

Calls 6

_new_futureMethod · 0.95
assertFalseMethod · 0.80
assertTrueMethod · 0.80
cancelledMethod · 0.45
doneMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected