@@ -71,24 +71,28 @@ def test_cross_module_gil_inner_pybind11_acquired():
7171 m .test_cross_module_gil_inner_pybind11_acquired ()
7272
7373
74+ @pytest .mark .skipif (sys .platform .startswith ("emscripten" ), reason = "Requires threads" )
7475def test_cross_module_gil_nested_custom_released ():
7576 """Makes sure that the GIL can be nested acquired/released by another module
7677 from a GIL-released state using custom locking logic."""
7778 m .test_cross_module_gil_nested_custom_released ()
7879
7980
81+ @pytest .mark .skipif (sys .platform .startswith ("emscripten" ), reason = "Requires threads" )
8082def test_cross_module_gil_nested_custom_acquired ():
8183 """Makes sure that the GIL can be nested acquired/acquired by another module
8284 from a GIL-acquired state using custom locking logic."""
8385 m .test_cross_module_gil_nested_custom_acquired ()
8486
8587
88+ @pytest .mark .skipif (sys .platform .startswith ("emscripten" ), reason = "Requires threads" )
8689def test_cross_module_gil_nested_pybind11_released ():
8790 """Makes sure that the GIL can be nested acquired/released by another module
8891 from a GIL-released state using pybind11 locking logic."""
8992 m .test_cross_module_gil_nested_pybind11_released ()
9093
9194
95+ @pytest .mark .skipif (sys .platform .startswith ("emscripten" ), reason = "Requires threads" )
9296def test_cross_module_gil_nested_pybind11_acquired ():
9397 """Makes sure that the GIL can be nested acquired/acquired by another module
9498 from a GIL-acquired state using pybind11 locking logic."""
@@ -103,6 +107,7 @@ def test_nested_acquire():
103107 assert m .test_nested_acquire (0xAB ) == "171"
104108
105109
110+ @pytest .mark .skipif (sys .platform .startswith ("emscripten" ), reason = "Requires threads" )
106111def test_multi_acquire_release_cross_module ():
107112 for bits in range (16 * 8 ):
108113 internals_ids = m .test_multi_acquire_release_cross_module (bits )
@@ -204,7 +209,7 @@ def _run_in_threads(test_fn, num_threads, parallel):
204209 thread .join ()
205210
206211
207- # TODO: FIXME, sometimes returns -11 (segfault) instead of 0 on macOS Python 3.9
212+ @ pytest . mark . skipif ( sys . platform . startswith ( "emscripten" ), reason = "Requires threads" )
208213@pytest .mark .parametrize ("test_fn" , ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK )
209214def test_run_in_process_one_thread (test_fn ):
210215 """Makes sure there is no GIL deadlock when running in a thread.
@@ -214,7 +219,7 @@ def test_run_in_process_one_thread(test_fn):
214219 assert _run_in_process (_run_in_threads , test_fn , num_threads = 1 , parallel = False ) == 0
215220
216221
217- # TODO: FIXME on macOS Python 3.9
222+ @ pytest . mark . skipif ( sys . platform . startswith ( "emscripten" ), reason = "Requires threads" )
218223@pytest .mark .parametrize ("test_fn" , ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK )
219224def test_run_in_process_multiple_threads_parallel (test_fn ):
220225 """Makes sure there is no GIL deadlock when running in a thread multiple times in parallel.
@@ -224,7 +229,7 @@ def test_run_in_process_multiple_threads_parallel(test_fn):
224229 assert _run_in_process (_run_in_threads , test_fn , num_threads = 8 , parallel = True ) == 0
225230
226231
227- # TODO: FIXME on macOS Python 3.9
232+ @ pytest . mark . skipif ( sys . platform . startswith ( "emscripten" ), reason = "Requires threads" )
228233@pytest .mark .parametrize ("test_fn" , ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK )
229234def test_run_in_process_multiple_threads_sequential (test_fn ):
230235 """Makes sure there is no GIL deadlock when running in a thread multiple times sequentially.
@@ -234,7 +239,7 @@ def test_run_in_process_multiple_threads_sequential(test_fn):
234239 assert _run_in_process (_run_in_threads , test_fn , num_threads = 8 , parallel = False ) == 0
235240
236241
237- # TODO: FIXME on macOS Python 3.9
242+ @ pytest . mark . skipif ( sys . platform . startswith ( "emscripten" ), reason = "Requires threads" )
238243@pytest .mark .parametrize ("test_fn" , ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK )
239244def test_run_in_process_direct (test_fn ):
240245 """Makes sure there is no GIL deadlock when using processes.
0 commit comments