asyncio: Fix pyflakes errors

- Add a missing import
- Remove an unused import
- Remove unused variables
This commit is contained in:
Victor Stinner 2014-06-18 03:25:23 +02:00
parent c73701de72
commit 64d750b36b
4 changed files with 6 additions and 5 deletions

View File

@ -588,10 +588,14 @@ Debug mode
Get the debug mode (:class:`bool`) of the event loop, ``False`` by default. Get the debug mode (:class:`bool`) of the event loop, ``False`` by default.
.. versionadded:: 3.4.2
.. method:: BaseEventLoop.set_debug(enabled: bool) .. method:: BaseEventLoop.set_debug(enabled: bool)
Set the debug mode of the event loop. Set the debug mode of the event loop.
.. versionadded:: 3.4.2
.. seealso:: .. seealso::
The :ref:`Develop with asyncio <asyncio-dev>` section. The :ref:`Develop with asyncio <asyncio-dev>` section.

View File

@ -108,10 +108,7 @@ class BaseSelectorEventLoopTests(test_utils.TestCase):
self.assertRaises(RuntimeError, self.loop.add_writer, fd, callback) self.assertRaises(RuntimeError, self.loop.add_writer, fd, callback)
def test_close_no_selector(self): def test_close_no_selector(self):
ssock = self.loop._ssock self.loop.remove_reader = mock.Mock()
csock = self.loop._csock
remove_reader = self.loop.remove_reader = mock.Mock()
self.loop._selector.close() self.loop._selector.close()
self.loop._selector = None self.loop._selector = None
self.loop.close() self.loop.close()

View File

@ -1,6 +1,5 @@
"""Tests for tasks.py.""" """Tests for tasks.py."""
import gc
import os.path import os.path
import sys import sys
import types import types

View File

@ -9,6 +9,7 @@ import _winapi
import asyncio import asyncio
from asyncio import _overlapped from asyncio import _overlapped
from asyncio import test_utils
from asyncio import windows_events from asyncio import windows_events