Commit 442b0adc authored by Victor Stinner's avatar Victor Stinner

asyncio: pyflakes, remove unused import

tests: Remove unused function; inline another function
parent cd0f7f98
......@@ -636,7 +636,7 @@ class BaseEventLoop(events.AbstractEventLoop):
try:
yield from waiter
except Exception as exc:
except Exception:
transport.close()
raise
......
......@@ -10,7 +10,6 @@ import collections
import errno
import functools
import socket
import sys
try:
import ssl
except ImportError: # pragma: no cover
......
......@@ -415,10 +415,6 @@ class StreamReaderTests(test_utils.TestCase):
def set_err():
stream.set_exception(ValueError())
@asyncio.coroutine
def readline():
yield from stream.readline()
t1 = asyncio.Task(stream.readline(), loop=self.loop)
t2 = asyncio.Task(set_err(), loop=self.loop)
......@@ -429,11 +425,7 @@ class StreamReaderTests(test_utils.TestCase):
def test_exception_cancel(self):
stream = asyncio.StreamReader(loop=self.loop)
@asyncio.coroutine
def read_a_line():
yield from stream.readline()
t = asyncio.Task(read_a_line(), loop=self.loop)
t = asyncio.Task(stream.readline(), loop=self.loop)
test_utils.run_briefly(self.loop)
t.cancel()
test_utils.run_briefly(self.loop)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment