summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-10-11 08:10:31 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-10-11 08:10:31 (GMT)
commitb45c0f7e4833615067dbe74c1e813fd1b45ce181 (patch)
tree323257810e2058ed478a0f4c12db8a43399d83e2
parentbc5b80bac1d3db5779fcace4922bfc7eb8b964fa (diff)
downloadcpython-b45c0f7e4833615067dbe74c1e813fd1b45ce181.zip
cpython-b45c0f7e4833615067dbe74c1e813fd1b45ce181.tar.gz
cpython-b45c0f7e4833615067dbe74c1e813fd1b45ce181.tar.bz2
Close #25367: Fix test_coroutines with no thread support
Skip test_asyncio_1() when the asyncio module cannot be imported because CPython is compiled with no thread support.
-rw-r--r--Lib/test/test_coroutines.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
index 10de856..71fbe82 100644
--- a/Lib/test/test_coroutines.py
+++ b/Lib/test/test_coroutines.py
@@ -1322,7 +1322,9 @@ class CoroutineTest(unittest.TestCase):
class CoroAsyncIOCompatTest(unittest.TestCase):
def test_asyncio_1(self):
- import asyncio
+ # asyncio cannot be imported when Python is compiled without thread
+ # support
+ support.import_module('asyncio')
class MyException(Exception):
pass