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

Method test_task_set_name_pylong

Lib/test/test_asyncio/test_tasks.py:405–415  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

403 self.loop.run_until_complete(t2)
404
405 def test_task_set_name_pylong(self):
406 # test that setting the task name to a PyLong explicitly doesn't
407 # incorrectly trigger the deferred name formatting logic
408 async def notmuch():
409 return 123
410
411 t = self.new_task(self.loop, notmuch(), name=987654321)
412 self.assertEqual(t.get_name(), '987654321')
413 t.set_name(123456789)
414 self.assertEqual(t.get_name(), '123456789')
415 self.loop.run_until_complete(t)
416
417 def test_task_repr_name_not_str(self):
418 async def notmuch():

Callers

nothing calls this directly

Calls 5

new_taskMethod · 0.95
assertEqualMethod · 0.45
get_nameMethod · 0.45
set_nameMethod · 0.45
run_until_completeMethod · 0.45

Tested by

no test coverage detected