summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_mailcap.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-05-23 15:21:45 (GMT)
committerGitHub <noreply@github.com>2022-05-23 15:21:45 (GMT)
commita29b1f8b4b6b1d16ff896876c21f2860d5087229 (patch)
tree67589b2654fb4b6a9197f9786611b0d316d6b743 /Lib/test/test_mailcap.py
parent9a2fe42b11c55c7a616bcff9c15e3245805c3f41 (diff)
downloadcpython-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_mailcap.py')
-rw-r--r--Lib/test/test_mailcap.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_mailcap.py b/Lib/test/test_mailcap.py
index 97a8fac..d3995b1 100644
--- a/Lib/test/test_mailcap.py
+++ b/Lib/test/test_mailcap.py
@@ -221,6 +221,10 @@ class FindmatchTest(unittest.TestCase):
@unittest.skipUnless(os.name == "posix", "Requires 'test' command on system")
@unittest.skipIf(sys.platform == "vxworks", "'test' command is not supported on VxWorks")
+ @unittest.skipUnless(
+ test.support.has_subprocess_support,
+ "'test' command needs process support."
+ )
def test_test(self):
# findmatch() will automatically check any "test" conditions and skip
# the entry if the check fails.