diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-05-23 15:21:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-23 15:21:45 (GMT) |
commit | a29b1f8b4b6b1d16ff896876c21f2860d5087229 (patch) | |
tree | 67589b2654fb4b6a9197f9786611b0d316d6b743 /Lib/test/support/socket_helper.py | |
parent | 9a2fe42b11c55c7a616bcff9c15e3245805c3f41 (diff) | |
download | cpython-a29b1f8b4b6b1d16ff896876c21f2860d5087229.zip cpython-a29b1f8b4b6b1d16ff896876c21f2860d5087229.tar.gz cpython-a29b1f8b4b6b1d16ff896876c21f2860d5087229.tar.bz2 |
gh-90473: WASI: skip gethostname tests (GH-93092)
- WASI's ``gethostname()`` is a stub that always fails with OSError
``ENOTSUP``
- skip mailcap ``test`` if subprocess is not available
- WASI process_time clock does not work.
(cherry picked from commit 760ec8940aabd6a7fc471bd913ea1ac501cc604b)
Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Lib/test/support/socket_helper.py')
-rw-r--r-- | Lib/test/support/socket_helper.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/support/socket_helper.py b/Lib/test/support/socket_helper.py index 754af18..42b2a93 100644 --- a/Lib/test/support/socket_helper.py +++ b/Lib/test/support/socket_helper.py @@ -11,6 +11,9 @@ HOST = "localhost" HOSTv4 = "127.0.0.1" HOSTv6 = "::1" +# WASI SDK 15.0 does not provide gethostname, stub raises OSError ENOTSUP. +has_gethostname = not support.is_wasi + def find_unused_port(family=socket.AF_INET, socktype=socket.SOCK_STREAM): """Returns an unused port that should be suitable for binding. This is |