]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-84559: skip the test when no multiprocessing (wasm, etc) (#101530)
authorGregory P. Smith <greg@krypto.org>
Fri, 3 Feb 2023 01:14:23 +0000 (17:14 -0800)
committerGitHub <noreply@github.com>
Fri, 3 Feb 2023 01:14:23 +0000 (17:14 -0800)
skip test when no _multiprocessing (wasm, etc)

Lib/test/test_multiprocessing_defaults.py

index 1da4c065238384f53a8751ea8ede0b126d1c0763..7ea872fef20dd96aadd634008579e23a5f1778a4 100644 (file)
@@ -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