Skip to content

Commit 33eaabf

Browse files
committed
FIx.
1 parent 1b335a2 commit 33eaabf

File tree

3 files changed

+29
-16
lines changed

3 files changed

+29
-16
lines changed

tests/test_capture.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import textwrap
23

34
import pytest
@@ -16,7 +17,14 @@
1617
reason="dask cannot handle dynamically imported modules."
1718
),
1819
),
19-
ParallelBackend.LOKY,
20+
pytest.param(
21+
ParallelBackend.LOKY,
22+
marks=pytest.mark.skipif(
23+
(sys.version_info[:2] == (3, 12) and sys.platform == "win32")
24+
or (sys.version_info[:2] == (3, 13) and sys.platform == "linux"),
25+
reason="Deadlock in loky/backend/resource_tracker.py, line 181, maybe related to https://github.com/joblib/loky/pull/450", # noqa: E501
26+
),
27+
),
2028
ParallelBackend.PROCESSES,
2129
],
2230
)

tests/test_config.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import os
4+
import sys
45
import textwrap
56

67
import pytest
@@ -32,16 +33,18 @@ def test_interplay_between_debugging_and_parallel(tmp_path, pdb, n_workers, expe
3233
("n_workers", 1, ExitCode.OK),
3334
("n_workers", 2, ExitCode.OK),
3435
("parallel_backend", "unknown_backend", ExitCode.CONFIGURATION_FAILED),
35-
]
36-
+ [
37-
("parallel_backend", parallel_backend, ExitCode.OK)
38-
for parallel_backend in (
36+
pytest.param(
37+
"parallel_backend",
3938
ParallelBackend.LOKY,
40-
ParallelBackend.PROCESSES,
41-
ParallelBackend.THREADS,
42-
)
43-
]
44-
+ [
39+
ExitCode.OK,
40+
marks=pytest.mark.skipif(
41+
(sys.version_info[:2] == (3, 12) and sys.platform == "win32")
42+
or (sys.version_info[:2] == (3, 13) and sys.platform == "linux"),
43+
reason="Deadlock in loky/backend/resource_tracker.py, line 181, maybe related to https://github.com/joblib/loky/pull/450", # noqa: E501
44+
),
45+
),
46+
("parallel_backend", ParallelBackend.PROCESSES, ExitCode.OK),
47+
("parallel_backend", ParallelBackend.THREADS, ExitCode.OK),
4548
pytest.param(
4649
"parallel_backend",
4750
"dask",

tests/test_execute.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@
2020
reason="dask cannot handle dynamically imported modules."
2121
),
2222
),
23-
ParallelBackend.LOKY,
23+
pytest.param(
24+
ParallelBackend.LOKY,
25+
marks=pytest.mark.skipif(
26+
(sys.version_info[:2] == (3, 12) and sys.platform == "win32")
27+
or (sys.version_info[:2] == (3, 13) and sys.platform == "linux"),
28+
reason="Deadlock in loky/backend/resource_tracker.py, line 181, maybe related to https://github.com/joblib/loky/pull/450", # noqa: E501
29+
),
30+
),
2431
ParallelBackend.PROCESSES,
2532
ParallelBackend.THREADS,
2633
]
@@ -77,11 +84,6 @@ def task_2(path: Annotated[Path, Product] = Path("out_2.txt")):
7784

7885

7986
@pytest.mark.parametrize("parallel_backend", _IMPLEMENTED_BACKENDS)
80-
@pytest.mark.skipif(
81-
(sys.version_info[:2] == (3, 12) and sys.platform == "win32")
82-
or (sys.version_info[:2] == (3, 13) and sys.platform == "linux"),
83-
reason="Deadlock in loky/backend/resource_tracker.py, line 181, maybe related to https://github.com/joblib/loky/pull/450/",
84-
)
8587
def test_stop_execution_when_max_failures_is_reached(tmp_path, parallel_backend):
8688
source = """
8789
import time

0 commit comments

Comments
 (0)