mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	asyncio: sync with Tulip
* Fix pyflakes warnings: remove unused imports and variables * asyncio.test_support now uses test.support and test.script_helper if available
This commit is contained in:
		
							parent
							
								
									fe02e39029
								
							
						
					
					
						commit
						d7ff5a5375
					
				
					 8 changed files with 17 additions and 23 deletions
				
			
		|  | @ -14,8 +14,8 @@ | |||
| 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 | ||||
|  |  | |||
|  | @ -27,7 +27,7 @@ | |||
| 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 | ||||
| 
 | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ | |||
| 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 | ||||
| 
 | ||||
|  |  | |||
|  | @ -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: | ||||
|  |  | |||
|  | @ -6,12 +6,12 @@ | |||
| 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)'] | ||||
|  |  | |||
|  | @ -7,16 +7,16 @@ | |||
| import unittest | ||||
| import weakref | ||||
| from unittest import mock | ||||
| try: | ||||
|     from test import support   # gc_collect | ||||
|     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 | ||||
| try: | ||||
|     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 | ||||
| 
 | ||||
| 
 | ||||
| PY34 = (sys.version_info >= (3, 4)) | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
|  | @ -5,18 +5,17 @@ | |||
| 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): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner