aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/test_windows_utils.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-12-18 12:29:53 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-12-18 12:29:53 +0100
commitdc7765d12c8b3008935659d70970ac3cd563e566 (patch)
tree776af64cd2452f2ce9c905f3aac6cb112f5514b7 /Lib/test/test_asyncio/test_windows_utils.py
parent3a1c738e6cf09d0972809fa431bf77dd564ff713 (diff)
downloadcpython-dc7765d12c8b3008935659d70970ac3cd563e566.tar.gz
cpython-dc7765d12c8b3008935659d70970ac3cd563e566.zip
asyncio: sync with Tulip
Diffstat (limited to 'Lib/test/test_asyncio/test_windows_utils.py')
-rw-r--r--Lib/test/test_asyncio/test_windows_utils.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/test/test_asyncio/test_windows_utils.py b/Lib/test/test_asyncio/test_windows_utils.py
index 3e7a211ea74..b9579491844 100644
--- a/Lib/test/test_asyncio/test_windows_utils.py
+++ b/Lib/test/test_asyncio/test_windows_utils.py
@@ -2,11 +2,14 @@
import socket
import sys
-import test.support
import unittest
-from test.support import IPV6_ENABLED
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')
@@ -28,7 +31,7 @@ class WinsocketpairTests(unittest.TestCase):
ssock, csock = windows_utils.socketpair()
self.check_winsocketpair(ssock, csock)
- @unittest.skipUnless(IPV6_ENABLED, 'IPv6 not supported or enabled')
+ @unittest.skipUnless(support.IPV6_ENABLED, 'IPv6 not supported or enabled')
def test_winsocketpair_ipv6(self):
ssock, csock = windows_utils.socketpair(family=socket.AF_INET6)
self.check_winsocketpair(ssock, csock)
@@ -114,7 +117,7 @@ class PipeTests(unittest.TestCase):
# check garbage collection of p closes handle
del p
- test.support.gc_collect()
+ support.gc_collect()
try:
_winapi.CloseHandle(h)
except OSError as e: