File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 2
2
cpython_only , captured_stdout ,
3
3
check_disallow_instantiation , is_emscripten , is_wasi ,
4
4
SHORT_TIMEOUT )
5
- import multiprocessing
6
5
import locale
7
6
import re
8
7
import string
13
12
from re import Scanner
14
13
from weakref import proxy
15
14
15
+ # some platforms lack working multiprocessing
16
+ try :
17
+ import _multiprocessing
18
+ except ImportError :
19
+ multiprocessing = None
20
+ else :
21
+ import multiprocessing
22
+
16
23
# Misc tests from Tim Peters' re.doc
17
24
18
25
# WARNING: Don't change details in these tests if you don't know
@@ -2409,6 +2416,7 @@ def test_template_function_and_flag_is_deprecated(self):
2409
2416
self .assertTrue (template_re1 .match ('ahoy' ))
2410
2417
self .assertFalse (template_re1 .match ('nope' ))
2411
2418
2419
+ @unittest .skipIf (multiprocessing is None , 'test requires multiprocessing' )
2412
2420
def test_regression_gh94675 (self ):
2413
2421
pattern = re .compile (r'(?<=[({}])(((//[^\n]*)?[\n])([\000-\040])*)*'
2414
2422
r'((/[^/\[\n]*(([^\n]|(\[\n]*(]*)*\]))'
You can’t perform that action at this time.
0 commit comments