bpo-32273: Move asyncio.test_utils to test.test_asyncio (#4785)

This commit is contained in:
Yury Selivanov 2017-12-11 10:04:40 -05:00 committed by GitHub
parent 9edad3c701
commit 3e9751819a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 29 additions and 61 deletions

View File

@ -14,18 +14,9 @@ from unittest import mock
import asyncio
from asyncio import base_events
from asyncio import constants
from asyncio import test_utils
try:
from test import support
except ImportError:
from asyncio import test_support as support
try:
from test.support.script_helper import assert_python_ok
except ImportError:
try:
from test.script_helper import assert_python_ok
except ImportError:
from asyncio.test_support import assert_python_ok
from test.test_asyncio import utils as test_utils
from test import support
from test.support.script_helper import assert_python_ok
MOCK_ANY = mock.ANY

View File

@ -3,7 +3,6 @@
import collections.abc
import concurrent.futures
import functools
import gc
import io
import os
import platform
@ -30,8 +29,7 @@ import asyncio
from asyncio import coroutines
from asyncio import proactor_events
from asyncio import selector_events
from asyncio import sslproto
from asyncio import test_utils
from test.test_asyncio import utils as test_utils
try:
from test import support
except ImportError:

View File

@ -9,12 +9,9 @@ import unittest
from unittest import mock
import asyncio
from asyncio import test_utils
from asyncio import futures
try:
from test import support
except ImportError:
from asyncio import test_support as support
from test.test_asyncio import utils as test_utils
from test import support
def _fakefunc(f):

View File

@ -5,7 +5,7 @@ from unittest import mock
import re
import asyncio
from asyncio import test_utils
from test.test_asyncio import utils as test_utils
STR_RGX_REPR = (
r'^<(?P<class>.*?) object at (?P<address>.*?)'

View File

@ -3,14 +3,11 @@
import types
import unittest
try:
from test import support
except ImportError:
from asyncio import test_support as support
from test import support
from unittest import mock
import asyncio
from asyncio import test_utils
from test.test_asyncio import utils as test_utils
class BaseTest(test_utils.TestCase):

View File

@ -9,7 +9,7 @@ from asyncio.proactor_events import BaseProactorEventLoop
from asyncio.proactor_events import _ProactorSocketTransport
from asyncio.proactor_events import _ProactorWritePipeTransport
from asyncio.proactor_events import _ProactorDuplexPipeTransport
from asyncio import test_utils
from test.test_asyncio import utils as test_utils
def close_transport(transport):

View File

@ -4,7 +4,7 @@ import unittest
from unittest import mock
import asyncio
from asyncio import test_utils
from test.test_asyncio import utils as test_utils
class _QueueTestBase(test_utils.TestCase):

View File

@ -11,11 +11,11 @@ except ImportError:
ssl = None
import asyncio
from asyncio import test_utils
from asyncio.selector_events import BaseSelectorEventLoop
from asyncio.selector_events import _SelectorTransport
from asyncio.selector_events import _SelectorSocketTransport
from asyncio.selector_events import _SelectorDatagramTransport
from test.test_asyncio import utils as test_utils
MOCK_ANY = mock.ANY

View File

@ -11,7 +11,7 @@ except ImportError:
import asyncio
from asyncio import log
from asyncio import sslproto
from asyncio import test_utils
from test.test_asyncio import utils as test_utils
@unittest.skipIf(ssl is None, 'No ssl module')

View File

@ -16,7 +16,7 @@ except ImportError:
ssl = None
import asyncio
from asyncio import test_utils
from test.test_asyncio import utils as test_utils
class StreamReaderTests(test_utils.TestCase):

View File

@ -7,11 +7,9 @@ from unittest import mock
import asyncio
from asyncio import base_subprocess
from asyncio import subprocess
from asyncio import test_utils
try:
from test import support
except ImportError:
from asyncio import test_support as support
from test.test_asyncio import utils as test_utils
from test import support
if sys.platform != 'win32':
from asyncio import unix_events

View File

@ -17,18 +17,9 @@ import asyncio
from asyncio import coroutines
from asyncio import futures
from asyncio import tasks
from asyncio import test_utils
try:
from test import support
except ImportError:
from asyncio import test_support as support
try:
from test.support.script_helper import assert_python_ok
except ImportError:
try:
from test.script_helper import assert_python_ok
except ImportError:
from asyncio.test_support import assert_python_ok
from test.test_asyncio import utils as test_utils
from test import support
from test.support.script_helper import assert_python_ok
@asyncio.coroutine

View File

@ -21,8 +21,8 @@ if sys.platform == 'win32':
import asyncio
from asyncio import log
from asyncio import test_utils
from asyncio import unix_events
from test.test_asyncio import utils as test_utils
MOCK_ANY = mock.ANY

View File

@ -11,8 +11,8 @@ import _overlapped
import _winapi
import asyncio
from asyncio import test_utils
from asyncio import windows_events
from test.test_asyncio import utils as test_utils
class UpperProto(asyncio.Protocol):

View File

@ -1,10 +1,8 @@
"""Tests for window_utils"""
import socket
import sys
import unittest
import warnings
from unittest import mock
if sys.platform != 'win32':
raise unittest.SkipTest('Windows only')
@ -13,10 +11,7 @@ import _overlapped
import _winapi
from asyncio import windows_utils
try:
from test import support
except ImportError:
from asyncio import test_support as support
from test import support
class PipeTests(unittest.TestCase):

View File

@ -26,11 +26,11 @@ try:
except ImportError: # pragma: no cover
ssl = None
from . import base_events
from . import events
from . import futures
from . import tasks
from .log import logger
from asyncio import base_events
from asyncio import events
from asyncio import futures
from asyncio import tasks
from asyncio.log import logger
from test import support

View File

@ -0,0 +1 @@
Move asyncio.test_utils to test.test_asyncio.