Skip to content

Commit

Permalink
pythongh-128201: Fix DeprecationWarning in test_pdb (python#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
Eclips4 authored Dec 25, 2024
1 parent 418114c commit d9ed42b
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions 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

0 comments on commit d9ed42b

Please sign in to comment.