From: Kirill Podoprigora Date: Wed, 25 Dec 2024 07:26:51 +0000 (+0200) Subject: gh-128201: Fix ``DeprecationWarning`` in ``test_pdb`` (#128202) X-Git-Tag: v3.14.0a4~198 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d9ed42bc00c74b3150be2a0eb28da03e01dffcc7;p=thirdparty%2FPython%2Fcpython.git gh-128201: Fix ``DeprecationWarning`` in ``test_pdb`` (#128202) --- diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index 58295cff8431..9b0806d8b2a9 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -2065,10 +2065,7 @@ if not SKIP_ASYNCIO_TESTS: ... 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', @@ -2129,10 +2126,7 @@ if not SKIP_ASYNCIO_TESTS: ... 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', @@ -2250,10 +2244,7 @@ if not SKIP_ASYNCIO_TESTS: ... 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', @@ -2350,10 +2341,7 @@ if not SKIP_ASYNCIO_TESTS: ... 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',