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

Method test_async

Lib/test/_test_multiprocessing.py:3003–3007  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3001 self.pool.map(sqr, SpecialIterable(), 1)
3002
3003 def test_async(self):
3004 res = self.pool.apply_async(sqr, (7, TIMEOUT1,))
3005 get = TimingWrapper(res.get)
3006 self.assertEqual(get(), 49)
3007 self.assertTimingAlmostEqual(get.elapsed, TIMEOUT1)
3008
3009 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
3010 def test_async_timeout(self):

Callers

nothing calls this directly

Calls 5

TimingWrapperClass · 0.85
apply_asyncMethod · 0.80
getFunction · 0.50
assertEqualMethod · 0.45

Tested by

no test coverage detected