summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncio/test_tasks.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-08-26 15:48:24 +0300
committerGitHub <noreply@github.com>2021-08-26 14:48:24 +0200
commit7dc505b8655b3e48b93a4274dfd26e5856d9c64f (patch)
tree37b7b69b36ba9ee715ecdbc2ea1926927d2eee33 /Lib/test/test_asyncio/test_tasks.py
parent8868d48712aee2b490efaf60bed8dfe9fb14d6b7 (diff)
downloadcpython-git-7dc505b8655b3e48b93a4274dfd26e5856d9c64f.tar.gz
bpo-45011: Fix test_asyncio without C module _asyncio (GH-27968)
Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/test/test_asyncio/test_tasks.py')
-rw-r--r--Lib/test/test_asyncio/test_tasks.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index 86710872ac..de003737f9 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -2875,15 +2875,18 @@ class GenericTaskTests(test_utils.TestCase):
def test_future_subclass(self):
self.assertTrue(issubclass(asyncio.Task, asyncio.Future))
+ @support.cpython_only
def test_asyncio_module_compiled(self):
# Because of circular imports it's easy to make _asyncio
# module non-importable. This is a simple test that will
# fail on systems where C modules were successfully compiled
- # (hence the test for _functools), but _asyncio somehow didn't.
+ # (hence the test for _functools etc), but _asyncio somehow didn't.
try:
import _functools
+ import _json
+ import _pickle
except ImportError:
- pass
+ self.skipTest('C modules are not available')
else:
try:
import _asyncio