Skip to content
Merged
Show file tree
Hide file tree
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
Next Next commit
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
  • Loading branch information
tkren committed Mar 11, 2023
commit 6ab6bcfcfa3f4e283c77b29921b82f3aac3ae4a3
4 changes: 3 additions & 1 deletion Lib/test/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def revise(filename, *args):


def tearDownModule():
asyncio.set_event_loop_policy(None)
if support.has_socket_support:
asyncio.set_event_loop_policy(None)


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


@support.requires_working_socket()
class TestGetAsyncGenState(unittest.IsolatedAsyncioTestCase):

def setUp(self):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix failed :mod:`test_inspect` tests on wasm32-emscripten and wasm32-wasi.
Patch by Thomas Krennwallner.