Skip to content

Commit 97e9a62

Browse files
committed
build(deps): Upgrade pytest to v9 and refine configuration
Upgrade the `pytest` dependency from version 8 to version 9. This change also includes migrating the `pytest` configuration in `pyproject.toml` from the legacy `[tool.pytest.ini_options]` section to the modern `[tool.pytest]` section. Further refine the `pytest` configuration by: - Adding `strict = true` to enforce stricter test collection and execution. - Explicitly defining `testpaths` to include `benches`, `src`, and `tests`. - Reordering the `[dependency-groups]` for improved readability and consistency. - Correcting a trailing comma in the `Typing :: Typed` classifier for better formatting.
1 parent f2fe7eb commit 97e9a62

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

template/pyproject.toml.jinja

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ classifiers = [
2222
"Programming Language :: Python :: 3.12",
2323
"Programming Language :: Python :: 3.13",
2424
"Programming Language :: Python :: 3.14",
25-
"Typing :: Typed",
25+
"Typing :: Typed"
2626
]
2727
dependencies = ["lazy-loader>=0.4,<0.5"]
2828
dynamic = ["version"]
@@ -38,10 +38,10 @@ dynamic = ["version"]
3838
"Source Code" = "https://github.com/{{ github_user }}/{{ github_repo }}"
3939

4040
[dependency-groups]
41-
build = ["check-wheel-contents>=0.6,<0.7", "hatch>=1,<2", "twine>=6,<7"]
4241
dev = ["icecream>=2,<3"]
42+
build = ["check-wheel-contents>=0.6,<0.7", "hatch>=1,<2", "twine>=6,<7"]
4343
docs = ["liblaf-mkdocs-preset>=0.2,<0.3", "mkdocs>=1,<2"]
44-
test = ["liblaf-pytest-preset>=0.1,<0.2", "pytest>=8,<9"]
44+
test = ["liblaf-pytest-preset>=0.1,<0.2", "pytest>=9,<10"]
4545

4646
[build-system]
4747
requires = ["hatch-vcs", "hatchling"]
@@ -87,15 +87,16 @@ linux = "6.12"
8787
[tool.pyright]
8888
extends = ".config/linters/pyrightconfig.json"
8989

90-
[tool.pytest.ini_options]
90+
[tool.pytest]
9191
addopts = [
9292
"--doctest-modules",
9393
"--hypothesis-show-statistics",
9494
"--import-mode=importlib",
9595
"--showlocals",
9696
"--strict-config",
97-
"--strict-markers",
97+
"--strict-markers"
9898
]
99+
strict = true
99100
testpaths = ["benches", "src", "tests"]
100101

101102
[tool.ruff]

0 commit comments

Comments
 (0)