Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-128201: Fix DeprecationWarning in Lib/test/test_pdb.py #128202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 25, 2024
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
Simplify code by using asyncio.run
  • Loading branch information
Eclips4 committed Dec 24, 2024
commit 83164c48abe58f53c4927ed638ee2fb558184b48
20 changes: 4 additions & 16 deletions 20 Lib/test/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2065,10 +2065,7 @@ def test_pdb_next_command_for_coroutine():
... await test_coro()

>>> def test_function():
... loop = asyncio.new_event_loop()
... loop.run_until_complete(test_main())
... loop.close()
... asyncio._set_event_loop_policy(None)
... asyncio.run(test_main())
... print("finished")

>>> with PdbTestInput(['step',
Expand Down Expand Up @@ -2129,10 +2126,7 @@ def test_pdb_next_command_for_asyncgen():
... await test_coro()

>>> def test_function():
... loop = asyncio.new_event_loop()
... loop.run_until_complete(test_main())
... loop.close()
... asyncio._set_event_loop_policy(None)
... asyncio.run(test_main())
... print("finished")

>>> with PdbTestInput(['step',
Expand Down Expand Up @@ -2250,10 +2244,7 @@ def test_pdb_return_command_for_coroutine():
... await test_coro()

>>> def test_function():
... loop = asyncio.new_event_loop()
... loop.run_until_complete(test_main())
... loop.close()
... asyncio._set_event_loop_policy(None)
... asyncio.run(test_main())
... print("finished")

>>> with PdbTestInput(['step',
Expand Down Expand Up @@ -2350,10 +2341,7 @@ def test_pdb_until_command_for_coroutine():
... await test_coro()

>>> def test_function():
... loop = asyncio.new_event_loop()
... loop.run_until_complete(test_main())
... loop.close()
... asyncio._set_event_loop_policy(None)
... asyncio.run(test_main())
... print("finished")

>>> with PdbTestInput(['step',
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.