Skip to content

Commit f29fe89

Browse files
committed
Skip multiprocessing test on java posix backend
1 parent e565b4f commit f29fe89

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

graalpython/com.oracle.graal.python.test/src/tests/test_entropy_subprocess.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
from tests.util import needs_capi
4949

5050

51+
POSIX_BACKEND_IS_JAVA = sys.implementation.name == "graalpy" and __graalpython__.posix_module_backend() == "java"
52+
53+
5154
@unittest.skipUnless(sys.implementation.name == "graalpy" and sys.platform.startswith("linux"), "Linux GraalPy-specific test")
5255
class EntropySubprocessTests(unittest.TestCase):
5356
HASH_SECRET_BYTES = 24
@@ -180,6 +183,7 @@ def test_multiprocessing_process_import_does_not_use_initrandom(self):
180183
"ok",
181184
)
182185

186+
@unittest.skipIf(POSIX_BACKEND_IS_JAVA, "multiprocessing doesn't work on Java POSIX backend")
183187
def test_multiprocessing_deliver_challenge_does_not_use_additional_initrandom(self):
184188
self.assert_initrandom_bytes_used(
185189
self.RANDOM_MODULE_BYTES,

graalpython/com.oracle.graal.python.test/src/tests/test_multiprocessing.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2022, 2026, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -42,16 +42,16 @@
4242
import unittest
4343

4444

45+
POSIX_BACKEND_IS_JAVA = sys.implementation.name == 'graalpy' and __graalpython__.posix_module_backend() == 'java'
46+
47+
48+
@unittest.skipIf(POSIX_BACKEND_IS_JAVA, "multiprocessing doesn't work on emulated backend")
4549
class MultiprocessingTest(unittest.TestCase):
4650
@classmethod
4751
def tearDownClass(cls):
4852
import multiprocessing.resource_tracker
4953
multiprocessing.resource_tracker._resource_tracker._stop()
5054

51-
@unittest.skipIf(
52-
sys.implementation.name == 'graalpy' and __graalpython__.posix_module_backend() == 'java',
53-
reason="TODO multiprocessing.Array doesn't work on emulated backend",
54-
)
5555
def test_array_read(self):
5656
# This used to be buggy due to wrong usage of memoryview offsets when two objects were allocated in the same block
5757
# Don't remove the unused value on the next line

0 commit comments

Comments
 (0)