@@ -69,24 +69,28 @@ def test_cross_module_gil_inner_pybind11_acquired():
6969 m .test_cross_module_gil_inner_pybind11_acquired ()
7070
7171
72+ @pytest .mark .skipif (sys .platform .startswith ("emscripten" ), reason = "Requires threads" )
7273def test_cross_module_gil_nested_custom_released ():
7374 """Makes sure that the GIL can be nested acquired/released by another module
7475 from a GIL-released state using custom locking logic."""
7576 m .test_cross_module_gil_nested_custom_released ()
7677
7778
79+ @pytest .mark .skipif (sys .platform .startswith ("emscripten" ), reason = "Requires threads" )
7880def test_cross_module_gil_nested_custom_acquired ():
7981 """Makes sure that the GIL can be nested acquired/acquired by another module
8082 from a GIL-acquired state using custom locking logic."""
8183 m .test_cross_module_gil_nested_custom_acquired ()
8284
8385
86+ @pytest .mark .skipif (sys .platform .startswith ("emscripten" ), reason = "Requires threads" )
8487def test_cross_module_gil_nested_pybind11_released ():
8588 """Makes sure that the GIL can be nested acquired/released by another module
8689 from a GIL-released state using pybind11 locking logic."""
8790 m .test_cross_module_gil_nested_pybind11_released ()
8891
8992
93+ @pytest .mark .skipif (sys .platform .startswith ("emscripten" ), reason = "Requires threads" )
9094def test_cross_module_gil_nested_pybind11_acquired ():
9195 """Makes sure that the GIL can be nested acquired/acquired by another module
9296 from a GIL-acquired state using pybind11 locking logic."""
@@ -101,6 +105,7 @@ def test_nested_acquire():
101105 assert m .test_nested_acquire (0xAB ) == "171"
102106
103107
108+ @pytest .mark .skipif (sys .platform .startswith ("emscripten" ), reason = "Requires threads" )
104109def test_multi_acquire_release_cross_module ():
105110 for bits in range (16 * 8 ):
106111 internals_ids = m .test_multi_acquire_release_cross_module (bits )
@@ -202,7 +207,7 @@ def _run_in_threads(test_fn, num_threads, parallel):
202207 thread .join ()
203208
204209
205- # TODO: FIXME, sometimes returns -11 (segfault) instead of 0 on macOS Python 3.9
210+ @ pytest . mark . skipif ( sys . platform . startswith ( "emscripten" ), reason = "Requires threads" )
206211@pytest .mark .parametrize ("test_fn" , ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK )
207212def test_run_in_process_one_thread (test_fn ):
208213 """Makes sure there is no GIL deadlock when running in a thread.
@@ -212,7 +217,7 @@ def test_run_in_process_one_thread(test_fn):
212217 assert _run_in_process (_run_in_threads , test_fn , num_threads = 1 , parallel = False ) == 0
213218
214219
215- # TODO: FIXME on macOS Python 3.9
220+ @ pytest . mark . skipif ( sys . platform . startswith ( "emscripten" ), reason = "Requires threads" )
216221@pytest .mark .parametrize ("test_fn" , ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK )
217222def test_run_in_process_multiple_threads_parallel (test_fn ):
218223 """Makes sure there is no GIL deadlock when running in a thread multiple times in parallel.
@@ -222,7 +227,7 @@ def test_run_in_process_multiple_threads_parallel(test_fn):
222227 assert _run_in_process (_run_in_threads , test_fn , num_threads = 8 , parallel = True ) == 0
223228
224229
225- # TODO: FIXME on macOS Python 3.9
230+ @ pytest . mark . skipif ( sys . platform . startswith ( "emscripten" ), reason = "Requires threads" )
226231@pytest .mark .parametrize ("test_fn" , ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK )
227232def test_run_in_process_multiple_threads_sequential (test_fn ):
228233 """Makes sure there is no GIL deadlock when running in a thread multiple times sequentially.
@@ -232,7 +237,7 @@ def test_run_in_process_multiple_threads_sequential(test_fn):
232237 assert _run_in_process (_run_in_threads , test_fn , num_threads = 8 , parallel = False ) == 0
233238
234239
235- # TODO: FIXME on macOS Python 3.9
240+ @ pytest . mark . skipif ( sys . platform . startswith ( "emscripten" ), reason = "Requires threads" )
236241@pytest .mark .parametrize ("test_fn" , ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK )
237242def test_run_in_process_direct (test_fn ):
238243 """Makes sure there is no GIL deadlock when using processes.
0 commit comments