]> granicus.if.org Git - python/commitdiff
asyncio: sync with Tulip
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 26 Dec 2014 20:16:42 +0000 (21:16 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 26 Dec 2014 20:16:42 +0000 (21:16 +0100)
* Fix pyflakes warnings: remove unused imports and variables
* asyncio.test_support now uses test.support and test.script_helper if available

Lib/test/test_asyncio/test_base_events.py
Lib/test/test_asyncio/test_events.py
Lib/test/test_asyncio/test_futures.py
Lib/test/test_asyncio/test_selector_events.py
Lib/test/test_asyncio/test_subprocess.py
Lib/test/test_asyncio/test_tasks.py
Lib/test/test_asyncio/test_unix_events.py
Lib/test/test_asyncio/test_windows_utils.py

index 4e5b6ca9dfcd647c0821da09b5a5ca6345690910..e8409159d51a153afa2fc22c46620b35ca6a4c6d 100644 (file)
@@ -14,8 +14,8 @@ from asyncio import base_events
 from asyncio import constants
 from asyncio import test_utils
 try:
-    from test.script_helper import assert_python_ok
     from test import support
+    from test.script_helper import assert_python_ok
 except ImportError:
     from asyncio import test_support as support
     from asyncio.test_support import assert_python_ok
index 063029208aef287097d7643ce2728fa07f1c3ebd..af2da1fedbdb650c4e5d475ce845a4a4a5217ba8 100644 (file)
@@ -27,7 +27,7 @@ from asyncio import proactor_events
 from asyncio import selector_events
 from asyncio import test_utils
 try:
-    from test import support  # find_unused_port, IPV6_ENABLED, TEST_HOME_DIR
+    from test import support
 except ImportError:
     from asyncio import test_support as support
 
index f9c3ad2086c55039d21597ed240cfbe058fff1a9..286370914d9fda49e28f477a8bff838060776361 100644 (file)
@@ -10,7 +10,7 @@ from unittest import mock
 import asyncio
 from asyncio import test_utils
 try:
-    from test import support   # gc_collect
+    from test import support
 except ImportError:
     from asyncio import test_support as support
 
index 8eba56c443b2665417bc2d8d3922694451c63063..ff114f82901adacbfdc437cc2c355c2a38929e0a 100644 (file)
@@ -1,10 +1,7 @@
 """Tests for selector_events.py"""
 
 import errno
-import gc
-import pprint
 import socket
-import sys
 import unittest
 from unittest import mock
 try:
index 08c8ac2450e222144e96be64a6e96def8bb414b8..55c47b5b46d8ff6835a711aa9046c1ed76480de6 100644 (file)
@@ -6,12 +6,12 @@ from unittest import mock
 import asyncio
 from asyncio import subprocess
 from asyncio import test_utils
-if sys.platform != 'win32':
-    from asyncio import unix_events
 try:
-    from test import support   # PIPE_MAX_SIZE
+    from test import support
 except ImportError:
     from asyncio import test_support as support
+if sys.platform != 'win32':
+    from asyncio import unix_events
 
 # Program blocking
 PROGRAM_BLOCKED = [sys.executable, '-c', 'import time; time.sleep(3600)']
index 25b21dc5ecf5a5e89262d9696fd2728ee1595e5e..1520fb4cc7511513634517a7bc4449759c5ff1d3 100644 (file)
@@ -7,17 +7,17 @@ import types
 import unittest
 import weakref
 from unittest import mock
+
+import asyncio
+from asyncio import coroutines
+from asyncio import test_utils
 try:
-    from test import support   # gc_collect
+    from test import support
     from test.script_helper import assert_python_ok
 except ImportError:
     from asyncio import test_support as support
     from asyncio.test_support import assert_python_ok
 
-import asyncio
-from asyncio import coroutines
-from asyncio import test_utils
-
 
 PY34 = (sys.version_info >= (3, 4))
 PY35 = (sys.version_info >= (3, 5))
index b6ad0189215b2e162c4450284bbc866821ee7b1f..4b825dc84bd96a4f2c9e2d302b6d4dd88c72a679 100644 (file)
@@ -1,11 +1,9 @@
 """Tests for unix_events.py."""
 
 import collections
-import gc
 import errno
 import io
 import os
-import pprint
 import signal
 import socket
 import stat
index b9579491844b1a593393f9eb9ad82c5c86f10c1e..af5c453b087478ade4f5b469d6eb92bb4d7935dd 100644 (file)
@@ -5,18 +5,17 @@ import sys
 import unittest
 from unittest import mock
 
-try:
-    from test import support  # gc_collect, IPV6_ENABLED
-except ImportError:
-    from asyncio import test_support as support
-
 if sys.platform != 'win32':
     raise unittest.SkipTest('Windows only')
 
 import _winapi
 
-from asyncio import windows_utils
 from asyncio import _overlapped
+from asyncio import windows_utils
+try:
+    from test import support
+except ImportError:
+    from asyncio import test_support as support
 
 
 class WinsocketpairTests(unittest.TestCase):