mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[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:
parent
f9979212f8
commit
4890ac136b
1 changed files with 187 additions and 181 deletions
|
@ -19,6 +19,9 @@ from test.support.import_helper import import_module
|
||||||
from test.support.pty_helper import run_pty, FakeInput
|
from test.support.pty_helper import run_pty, FakeInput
|
||||||
from unittest.mock import patch
|
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):
|
class PdbTestInput(object):
|
||||||
"""Context manager that makes testing Pdb in doctests easier."""
|
"""Context manager that makes testing Pdb in doctests easier."""
|
||||||
|
@ -1180,7 +1183,8 @@ def test_pdb_next_command_for_generator():
|
||||||
finished
|
finished
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def test_pdb_next_command_for_coroutine():
|
if not SKIP_ASYNCIO_TESTS:
|
||||||
|
def test_pdb_next_command_for_coroutine():
|
||||||
"""Testing skip unwindng stack on yield for coroutines for "next" command
|
"""Testing skip unwindng stack on yield for coroutines for "next" command
|
||||||
|
|
||||||
>>> import asyncio
|
>>> import asyncio
|
||||||
|
@ -1236,7 +1240,7 @@ def test_pdb_next_command_for_coroutine():
|
||||||
finished
|
finished
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def test_pdb_next_command_for_asyncgen():
|
def test_pdb_next_command_for_asyncgen():
|
||||||
"""Testing skip unwindng stack on yield for coroutines for "next" command
|
"""Testing skip unwindng stack on yield for coroutines for "next" command
|
||||||
|
|
||||||
>>> import asyncio
|
>>> import asyncio
|
||||||
|
@ -1352,7 +1356,8 @@ def test_pdb_return_command_for_generator():
|
||||||
finished
|
finished
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def test_pdb_return_command_for_coroutine():
|
if not SKIP_ASYNCIO_TESTS:
|
||||||
|
def test_pdb_return_command_for_coroutine():
|
||||||
"""Testing no unwindng stack on yield for coroutines for "return" command
|
"""Testing no unwindng stack on yield for coroutines for "return" command
|
||||||
|
|
||||||
>>> import asyncio
|
>>> import asyncio
|
||||||
|
@ -1438,7 +1443,8 @@ def test_pdb_until_command_for_generator():
|
||||||
finished
|
finished
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def test_pdb_until_command_for_coroutine():
|
if not SKIP_ASYNCIO_TESTS:
|
||||||
|
def test_pdb_until_command_for_coroutine():
|
||||||
"""Testing no unwindng stack for coroutines
|
"""Testing no unwindng stack for coroutines
|
||||||
for "until" command if target breakpoint is not reached
|
for "until" command if target breakpoint is not reached
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue