[3.12] gh-114275: Skip doctests that use asyncio in test_pdb for WASI builds (GH-114309) (#114439)

gh-114275: Skip doctests that use `asyncio` in `test_pdb` for WASI builds (GH-114309)
(cherry picked from commit efb81a60f5)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2024-01-22 18:02:23 +01:00 committed by GitHub
parent f9979212f8
commit 4890ac136b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,6 +19,9 @@ from test.support.import_helper import import_module
from test.support.pty_helper import run_pty, FakeInput
from unittest.mock import patch
# gh-114275: WASI fails to run asyncio tests, similar skip than test_asyncio.
SKIP_ASYNCIO_TESTS = (not support.has_socket_support)
class PdbTestInput(object):
"""Context manager that makes testing Pdb in doctests easier."""
@ -1180,6 +1183,7 @@ def test_pdb_next_command_for_generator():
finished
"""
if not SKIP_ASYNCIO_TESTS:
def test_pdb_next_command_for_coroutine():
"""Testing skip unwindng stack on yield for coroutines for "next" command
@ -1352,6 +1356,7 @@ def test_pdb_return_command_for_generator():
finished
"""
if not SKIP_ASYNCIO_TESTS:
def test_pdb_return_command_for_coroutine():
"""Testing no unwindng stack on yield for coroutines for "return" command
@ -1438,6 +1443,7 @@ def test_pdb_until_command_for_generator():
finished
"""
if not SKIP_ASYNCIO_TESTS:
def test_pdb_until_command_for_coroutine():
"""Testing no unwindng stack for coroutines
for "until" command if target breakpoint is not reached