diff options
author | Thomas Krennwallner <tk@postsubmeta.net> | 2023-03-11 18:36:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-11 18:36:49 (GMT) |
commit | 534660f1680955c7a6a47d5c6bd9649704b74a87 (patch) | |
tree | b9b2e47bf9f7c2a07eec72ad68ece5688db88b8e /Lib/test/test_inspect.py | |
parent | ced13c96a4eb9391a9d27e3e13218f70c579670f (diff) | |
download | cpython-534660f1680955c7a6a47d5c6bd9649704b74a87.zip cpython-534660f1680955c7a6a47d5c6bd9649704b74a87.tar.gz cpython-534660f1680955c7a6a47d5c6bd9649704b74a87.tar.bz2 |
gh-79940: skip `TestGetAsyncGenState` on wasm as it requires working sockets (GH-102605)
Skip `TestGetAsyncGenState` and restoring of the default event loop policy in `test_inspect` if platform lacks working socket support.
Fixes #11590
Automerge-Triggered-By: GH:kumaraditya303
Diffstat (limited to 'Lib/test/test_inspect.py')
-rw-r--r-- | Lib/test/test_inspect.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py index 410a2e5..803b259 100644 --- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -67,7 +67,8 @@ git = mod.StupidGit() 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(): @@ -2326,6 +2327,7 @@ class TestGetCoroutineState(unittest.TestCase): {'a': None, 'gencoro': gencoro, 'b': 'spam'}) +@support.requires_working_socket() class TestGetAsyncGenState(unittest.IsolatedAsyncioTestCase): def setUp(self): |