Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Skip asyncio test on wasi
  • Loading branch information
gaogaotiantian committed Mar 11, 2025
commit dcb96df5baba1804dd3f0d485915729e66032e42
47 changes: 24 additions & 23 deletions Lib/test/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from contextlib import ExitStack, redirect_stdout
from io import StringIO
from test import support
from test.support import force_not_colorized, os_helper
from test.support import force_not_colorized, has_socket_support, os_helper
from test.support.import_helper import import_module
from test.support.pty_helper import run_pty, FakeInput
from test.support.script_helper import kill_python
Expand Down Expand Up @@ -2059,28 +2059,29 @@ def test_pdb_next_command_for_generator():
"""

if not SKIP_CORO_TESTS:
def test_pdb_asynctask():
"""Testing $_asynctask is accessible in async context

>>> import asyncio

>>> async def test():
... import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()

>>> def test_function():
... asyncio.run(test())

>>> with PdbTestInput([ # doctest: +ELLIPSIS
... '$_asynctask',
... 'continue',
... ]):
... test_function()
> <doctest test.test_pdb.test_pdb_asynctask[1]>(2)test()
-> import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()
(Pdb) $_asynctask
<Task pending name='Task-1' coro=<test() running at <doctest test.test_pdb.test_pdb_asynctask[1]>:2> ...
(Pdb) continue
"""
if has_socket_support:
def test_pdb_asynctask():
"""Testing $_asynctask is accessible in async context

>>> import asyncio

>>> async def test():
... import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()

>>> def test_function():
... asyncio.run(test())

>>> with PdbTestInput([ # doctest: +ELLIPSIS
... '$_asynctask',
... 'continue',
... ]):
... test_function()
> <doctest test.test_pdb.test_pdb_asynctask[1]>(2)test()
-> import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()
(Pdb) $_asynctask
<Task pending name='Task-1' coro=<test() running at <doctest test.test_pdb.test_pdb_asynctask[1]>:2> ...
(Pdb) continue
"""

def test_pdb_next_command_for_coroutine():
"""Testing skip unwinding stack on yield for coroutines for "next" command
Expand Down