summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@dropbox.com>2013-10-17 21:23:17 (GMT)
committerGuido van Rossum <guido@dropbox.com>2013-10-17 21:23:17 (GMT)
commit5ea7f93dcdd3d78082a03310e847d4e646ff4fbb (patch)
treeebf4014ca1eca6bea984a481ed21b1d24981c873
parent27b7c7ebf1039e96cac41b6330cf16b5632d9e49 (diff)
downloadcpython-5ea7f93dcdd3d78082a03310e847d4e646ff4fbb.zip
cpython-5ea7f93dcdd3d78082a03310e847d4e646ff4fbb.tar.gz
cpython-5ea7f93dcdd3d78082a03310e847d4e646ff4fbb.tar.bz2
Make asyncio tests run on Windows.
-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 011a09d..31d8151 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 ea67862..6dbd47f 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 4b96086..3b6b036 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):