Skip to content

Commit 2c44e3b

Browse files
committed
TestGetAsyncGenState requires working sockets
Skip `TestGetAsyncGenState` and restoring of the default event loop policy in `test_inspect` if platform lacks working socket support. Fixes #11590
1 parent ced13c9 commit 2c44e3b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_inspect.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ def revise(filename, *args):
6767

6868

6969
def tearDownModule():
70-
asyncio.set_event_loop_policy(None)
70+
if support.has_socket_support:
71+
asyncio.set_event_loop_policy(None)
7172

7273

7374
def signatures_with_lexicographic_keyword_only_parameters():
@@ -2326,6 +2327,7 @@ async def func(a=None):
23262327
{'a': None, 'gencoro': gencoro, 'b': 'spam'})
23272328

23282329

2330+
@support.requires_working_socket()
23292331
class TestGetAsyncGenState(unittest.IsolatedAsyncioTestCase):
23302332

23312333
def setUp(self):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy