Skip to content

Commit 35eff43

Browse files
chore: bump pytest version and include pytest-xdist (#1008)
Minor cleanup. Require pytest 7.2+. --------- Signed-off-by: Henry Schreiner <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 47431d4 commit 35eff43

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,13 @@ jobs:
121121
run:
122122
uv pip install
123123
-e.[test,test-meta,test-numpy,test-schema,test-hatchling,wheels,cov,wheel-free-setuptools]
124-
pytest-xdist --system
124+
--system
125125

126126
- name: Install package (pip)
127127
if: matrix.python-version == 'pypy-3.8'
128128
run:
129129
pip install
130130
-e.[test,test-meta,test-numpy,test-schema,wheels,cov,wheel-free-setuptools]
131-
pytest-xdist
132131

133132
- name: Test package
134133
if: "!contains(matrix.python_version, 'pypy')"
@@ -203,7 +202,7 @@ jobs:
203202
run: pip list
204203

205204
- name: Test min package
206-
run: pytest -ra --showlocals -Wdefault
205+
run: pytest -n auto -ra --showlocals -Wdefault
207206

208207
manylinux:
209208
name: Manylinux on 🐍 3.13 • Free-threaded
@@ -247,7 +246,7 @@ jobs:
247246

248247
- name: Test package
249248
run:
250-
python3.9 -m pytest -ra --showlocals -m "not virtualenv"
249+
python3.9 -m pytest -n auto -ra --showlocals -m "not virtualenv"
251250
--durations=20
252251

253252
msys:
@@ -280,7 +279,7 @@ jobs:
280279

281280
- name: Test package
282281
run: >-
283-
python -m pytest -ra --showlocals -m "not broken_on_urct"
282+
python -m pytest -n auto -ra --showlocals -m "not broken_on_urct"
284283
--durations=20
285284
286285
mingw64:
@@ -313,7 +312,8 @@ jobs:
313312

314313
- name: Test package
315314
run: >-
316-
python -m pytest -ra --showlocals -m "not setuptools" --durations=20
315+
python -m pytest -n auto -ra --showlocals -m "not setuptools"
316+
--durations=20
317317
env:
318318
SETUPTOOLS_USE_DISTUTILS: "local"
319319

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ strict-config = true
329329
experimental = false
330330

331331
# If set, this will provide a method for backward compatibility.
332-
minimum-version = "0.10" # current version
332+
minimum-version = "0.11" # current version
333333

334334
# The build directory. Defaults to a temporary directory, but can be set.
335335
build-dir = ""

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _run_tests(
7474
posargs.append("--cov-config=pyproject.toml")
7575

7676
install_arg = f"-e.[{','.join(_extras)}]"
77-
session.install(install_arg, *install_args, "pytest-xdist", silent=False)
77+
session.install(install_arg, *install_args, silent=False)
7878
session.run("pytest", *run_args, *posargs, env=env)
7979

8080

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ test = [
5252
"pip>=23; python_version<'3.13'",
5353
"pip>=24.1; python_version>='3.13'",
5454
"pybind11 >=2.11",
55-
"pytest >=7.0", # 7.2+ recommended for better tracebacks with ExceptionGroup
55+
"pytest >=7.2",
5656
"pytest-subprocess >=1.5",
57+
'pytest-xdist >=3.1',
5758
'setuptools >=43; python_version<"3.9"',
5859
'setuptools >=45; python_version=="3.9"',
5960
'setuptools >=49; python_version>="3.10" and python_version<"3.12"',
@@ -126,14 +127,13 @@ build.hooks.vcs.version-file = "src/scikit_build_core/_version.py"
126127

127128
[tool.uv]
128129
dev-dependencies = ["scikit-build-core[test,test-hatchling,test-meta,test-numpy,test-schema,cov,dev]"]
129-
environments = ["python_version >= '3.11'"]
130130
pip.reinstall-package = ["scikit-build-core"]
131131
workspace.members = ["tmp/hello/hello"]
132132

133133

134134
[tool.pytest.ini_options]
135-
minversion = "7.0"
136-
addopts = ["-rfEsX", "--strict-markers", "--strict-config"]
135+
minversion = "7.2"
136+
addopts = ["-ra", "--strict-markers", "--strict-config"]
137137
xfail_strict = true
138138
filterwarnings = [
139139
"error",

0 commit comments

Comments
 (0)