aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_asyncio/test_streams.py5
-rw-r--r--Lib/test/test_asyncio/test_unix_events.py3
-rw-r--r--Lib/test/test_asyncio/test_windows_utils.py6
3 files changed, 12 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py
index 011a09da3a1..31d81514365 100644
--- a/Lib/test/test_asyncio/test_streams.py
+++ b/Lib/test/test_asyncio/test_streams.py
@@ -1,9 +1,12 @@
"""Tests for streams.py."""
import gc
-import ssl
import unittest
import unittest.mock
+try:
+ import ssl
+except ImportError:
+ ssl = None
from asyncio import events
from asyncio import streams
diff --git a/Lib/test/test_asyncio/test_unix_events.py b/Lib/test/test_asyncio/test_unix_events.py
index ea678624310..6dbd47f63be 100644
--- a/Lib/test/test_asyncio/test_unix_events.py
+++ b/Lib/test/test_asyncio/test_unix_events.py
@@ -10,6 +10,9 @@ import sys
import unittest
import unittest.mock
+if sys.platform == 'win32':
+ raise unittest.SkipTest('UNIX only')
+
from asyncio import events
from asyncio import futures
diff --git a/Lib/test/test_asyncio/test_windows_utils.py b/Lib/test/test_asyncio/test_windows_utils.py
index 4b96086186c..3b6b036893e 100644
--- a/Lib/test/test_asyncio/test_windows_utils.py
+++ b/Lib/test/test_asyncio/test_windows_utils.py
@@ -11,7 +11,11 @@ if sys.platform != 'win32':
import _winapi
from asyncio import windows_utils
-from asyncio import _overlapped
+
+try:
+ import _overlapped
+except ImportError:
+ from asyncio import _overlapped
class WinsocketpairTests(unittest.TestCase):