From: Guido van Rossum Date: Mon, 18 Nov 2013 01:00:21 +0000 (-0800) Subject: Skip test_asyncio if concurrent.futures can't be imported. Hopeful fix for issue... X-Git-Tag: v3.4.0b1~205 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=32879053357de0fb143e0b335eec1fc6b27e07bc;p=thirdparty%2FPython%2Fcpython.git Skip test_asyncio if concurrent.futures can't be imported. Hopeful fix for issue 19645. --- diff --git a/Lib/test/test_asyncio/__init__.py b/Lib/test/test_asyncio/__init__.py index 024d3e174385..23ce5e805956 100644 --- a/Lib/test/test_asyncio/__init__.py +++ b/Lib/test/test_asyncio/__init__.py @@ -1,12 +1,12 @@ import os import sys import unittest -from test.support import run_unittest +from test.support import run_unittest, import_module -try: - import threading -except ImportError: - raise unittest.SkipTest("No module named '_thread'") +# Skip tests if we don't have threading. +import_module('threading') +# Skip tests if we don't have concurrent.futures. +import_module('concurrent.futures') def suite():