summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2023-02-03 01:14:23 (GMT)
committerGitHub <noreply@github.com>2023-02-03 01:14:23 (GMT)
commit5dcae3f0c3e9072251217e814a9438670e5f1e40 (patch)
treeedf117a6aaa1130383434e8aa243ac111fe52af5
parent1b6045668d233269f667c4658c7240256f37f111 (diff)
downloadcpython-5dcae3f0c3e9072251217e814a9438670e5f1e40.zip
cpython-5dcae3f0c3e9072251217e814a9438670e5f1e40.tar.gz
cpython-5dcae3f0c3e9072251217e814a9438670e5f1e40.tar.bz2
gh-84559: skip the test when no multiprocessing (wasm, etc) (#101530)
skip test when no _multiprocessing (wasm, etc)
-rw-r--r--Lib/test/test_multiprocessing_defaults.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_multiprocessing_defaults.py b/Lib/test/test_multiprocessing_defaults.py
index 1da4c06..7ea872f 100644
--- a/Lib/test/test_multiprocessing_defaults.py
+++ b/Lib/test/test_multiprocessing_defaults.py
@@ -4,10 +4,13 @@ from inspect import currentframe, getframeinfo
import multiprocessing
from multiprocessing.context import DefaultForkDeprecationWarning
import sys
-from test.support import threading_helper
+from test.support import import_helper, threading_helper
import unittest
import warnings
+# Skip tests if _multiprocessing wasn't built.
+import_helper.import_module('_multiprocessing')
+
def do_nothing():
pass