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/test_urllib.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/test_urllib.py')
-rw-r--r-- | Lib/test/test_urllib.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index bc6e74c..f067560 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -10,6 +10,7 @@ import unittest from unittest.mock import patch from test import support from test.support import os_helper +from test.support import socket_helper from test.support import warnings_helper import os try: @@ -24,6 +25,10 @@ from base64 import b64encode import collections +if not socket_helper.has_gethostname: + raise unittest.SkipTest("test requires gethostname()") + + def hexescape(char): """Escape char as RFC 2396 specifies""" hex_repr = hex(ord(char))[2:].upper() |