mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
asyncio: pep8-ify the code.
This commit is contained in:
parent
b0b0e628ee
commit
b41a42e316
5 changed files with 26 additions and 12 deletions
|
@ -876,6 +876,7 @@ class TaskTests(unittest.TestCase):
|
|||
self.assertEqual(set(f.result() for f in done), {'a', 'b'})
|
||||
|
||||
def test_as_completed_duplicate_coroutines(self):
|
||||
|
||||
@asyncio.coroutine
|
||||
def coro(s):
|
||||
return s
|
||||
|
@ -884,7 +885,8 @@ class TaskTests(unittest.TestCase):
|
|||
def runner():
|
||||
result = []
|
||||
c = coro('ham')
|
||||
for f in asyncio.as_completed([c, c, coro('spam')], loop=self.loop):
|
||||
for f in asyncio.as_completed([c, c, coro('spam')],
|
||||
loop=self.loop):
|
||||
result.append((yield from f))
|
||||
return result
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue