diff options
author | Guido van Rossum <guido@dropbox.com> | 2013-11-18 01:00:21 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@dropbox.com> | 2013-11-18 01:00:21 (GMT) |
commit | 32879053357de0fb143e0b335eec1fc6b27e07bc (patch) | |
tree | 1b6c65d16bc152da2a3c2d6121ca8a7e3ca0b242 /Lib | |
parent | afccb0a8210a6af47336915912d0ff04c276223b (diff) | |
download | cpython-32879053357de0fb143e0b335eec1fc6b27e07bc.zip cpython-32879053357de0fb143e0b335eec1fc6b27e07bc.tar.gz cpython-32879053357de0fb143e0b335eec1fc6b27e07bc.tar.bz2 |
Skip test_asyncio if concurrent.futures can't be imported. Hopeful fix for issue 19645.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_asyncio/__init__.py | 10 |
1 files 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(): |