Lines Matching defs:test

22 from test.test_asyncio import utils as test_utils
23 from test import support
24 from test.support.script_helper import assert_python_ok
166 async def test():
169 task = asyncio.ensure_future(test(), loop=self.loop)
206 async def test():
208 t = self.loop.run_until_complete(test())
301 # test get_stack()
308 # test print_stack()
328 # test coroutine function
337 # test coroutine object
343 # test pending Task
352 # test cancelling Task
357 # test cancelled Task
365 # test finished Task
559 # This test recreates the following high-level structure using uncancel()::
867 self.assertIs(t._fut_waiter, fut1) # White-box test.
870 self.assertIs(t._fut_waiter, fut2) # White-box test.
893 self.assertIs(t._fut_waiter, fut1) # White-box test.
896 self.assertIs(t._fut_waiter, fut2) # White-box test.
900 self.assertIs(t._fut_waiter, fut3) # White-box test.
913 self.assertTrue(t._must_cancel) # White-box test.
924 self.assertFalse(t._must_cancel) # White-box test.
934 self.assertTrue(t._must_cancel) # White-box test.
943 self.assertFalse(t._must_cancel) # White-box test.
1119 c = self.loop.create_task(coro('test'))
1127 self.assertEqual(set(f.result() for f in done), {'test', 'spam'})
1471 async def test():
1483 loop.run_until_complete(test())
1498 async def test():
1507 loop.run_until_complete(test())
1544 async def test():
1549 loop.run_until_complete(test())
1744 return 'test'
1752 self.assertEqual(res, 'test')
1761 fut.set_result('test')
1973 async def test():
1975 outer = self.loop.run_until_complete(test())
2134 async def test():
2144 qwe = self.new_task(loop, test())
2207 # test it for the second time to ensure that caching
2222 # test it for the second time to ensure that caching
2233 # test it for the second time to ensure that caching
2486 # Add patched Task & Future back to the test case
2490 # Add an extra unit-test
2493 # Disable the "test_task_source_traceback" test
2494 # (the test is hardcoded for a particular call stack, which
2850 # module non-importable. This is a simple test that will
2852 # (hence the test for _functools etc), but _asyncio somehow didn't.
2942 # Test with -E to not fail if the unit test was run with