Skip to content

Commit c375314

Browse files
committed
gh-144503: Accept non-importable resource
The `resource` module is not available in a WASI environment.
1 parent 2f435b3 commit c375314

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/test/_test_multiprocessing.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import collections.abc
2121
import socket
2222
import random
23-
import resource
2423
import logging
2524
import shutil
2625
import subprocess
@@ -82,6 +81,11 @@
8281
except ImportError:
8382
msvcrt = None
8483

84+
try:
85+
import resource
86+
except ImportError:
87+
resource = None
88+
8589

8690
if support.HAVE_ASAN_FORK_BUG:
8791
# gh-89363: Skip multiprocessing tests if Python is built with ASAN to

0 commit comments

Comments
 (0)