From: Guido van Rossum Date: Thu, 17 Oct 2013 21:23:17 +0000 (-0700) Subject: Make asyncio tests run on Windows. X-Git-Tag: v3.4.0a4~75 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5ea7f93dcdd3d78082a03310e847d4e646ff4fbb;p=thirdparty%2FPython%2Fcpython.git Make asyncio tests run on Windows. --- diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py index 011a09da3a17..31d815143657 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 ea6786243108..6dbd47f63bee 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 4b96086186c8..3b6b036893e2 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):