From 32879053357de0fb143e0b335eec1fc6b27e07bc Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sun, 17 Nov 2013 17:00:21 -0800 Subject: Skip test_asyncio if concurrent.futures can't be imported. Hopeful fix for issue 19645. --- Lib/test/test_asyncio/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Lib/test/test_asyncio/__init__.py b/Lib/test/test_asyncio/__init__.py index 024d3e1..23ce5e8 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(): -- cgit v0.12