Skip to content

Commit 244f785

Browse files
committed
Run PillowLeakTestCases separetely without xdist
1 parent c185e63 commit 244f785

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.ci/test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ set -e
44

55
python3 -c "from PIL import Image"
66

7-
python3 -bb -m pytest -vv -x -W always --cov PIL --cov Tests --cov-report term --cov-report xml Tests $REVERSE
7+
python3 -bb -m pytest -vv -x -W always Tests -m "isolated" -n0
8+
python3 -bb -m pytest -vv -x -W always Tests -m "not isolated" --cov PIL --cov Tests --cov-report term --cov-report xml $REVERSE

Tests/helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ def mark_if_feature_version(
216216
return pytest.mark.pil_noop_mark()
217217

218218

219+
@pytest.mark.isolated
219220
@pytest.mark.skipif(sys.platform.startswith("win32"), reason="Requires Unix or macOS")
220221
class PillowLeakTestCase:
221222
# requires unix/macOS

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ max_supported_python = "3.14"
210210

211211
[tool.pytest.ini_options]
212212
addopts = "-ra --color=auto --numprocesses=auto --dist=loadscope"
213+
markers = [
214+
"isolated: tests that are not compatible with pytest-xdist (deselect with '-m \"not isolated\"')",
215+
]
213216
testpaths = [
214217
"Tests",
215218
]

0 commit comments

Comments
 (0)