diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-08-26 06:41:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-26 06:41:29 -0700 |
commit | 9f814beadb3ee2c7b37e949a2acf72117a449ffd (patch) | |
tree | 6ffd903ea16d6cbb4f86e89cc0eea6d8554c52ae /Lib/test/test_asyncio/test_tasks.py | |
parent | 32c1caa87f68a650f2d009a589a1db30484499cb (diff) | |
download | cpython-git-9f814beadb3ee2c7b37e949a2acf72117a449ffd.tar.gz |
bpo-45011: Fix test_asyncio without C module _asyncio (GH-27968)
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
(cherry picked from commit 7dc505b8655b3e48b93a4274dfd26e5856d9c64f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/test/test_asyncio/test_tasks.py')
-rw-r--r-- | Lib/test/test_asyncio/test_tasks.py | 7 |
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 a9e4cf5356..f7345c5c40 100644 --- a/Lib/test/test_asyncio/test_tasks.py +++ b/Lib/test/test_asyncio/test_tasks.py @@ -3275,15 +3275,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 |