Skip to content

Commit 6a35ade

Browse files
committed
chore: Update pytest/coverage config
1 parent 422ad45 commit 6a35ade

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

pyproject.toml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,23 +116,31 @@ skip-string-normalization = true
116116
extend-exclude = '_version.py'
117117

118118
[tool.pytest.ini_options]
119-
norecursedirs = ".git"
120-
addopts = "-sv --doctest-modules"
119+
minversion = "6"
120+
testpaths = ["niworkflows"]
121+
log_cli_level = "INFO"
122+
xfail_strict = true
123+
norecursedirs = [".git"]
124+
addopts = [
125+
"-svx",
126+
"-ra",
127+
"--strict-config",
128+
"--strict-markers",
129+
"--doctest-modules",
130+
# Config pytest-cov
131+
"--cov=niworkflows",
132+
"--cov-report=xml",
133+
"--cov-config=pyproject.toml",
134+
]
121135
doctest_optionflags = "ALLOW_UNICODE NORMALIZE_WHITESPACE ELLIPSIS"
122-
env = """
123-
PYTHONHASHSEED=0
124-
"""
125-
filterwarnings = """
126-
ignore::DeprecationWarning
127-
"""
136+
env = "PYTHONHASHSEED=0"
137+
filterwarnings = ["ignore::DeprecationWarning"]
128138
junit_family = "xunit2"
129139

130140
[tool.coverage.run]
131141
branch = true
132142
omit = [
133-
"*/tests/*",
134-
"niworkflows/_version.py",
135-
"niworkflows/conftest.py",
143+
"*/_version.py",
136144
]
137145

138146
[tool.coverage.report]
@@ -141,3 +149,9 @@ exclude_lines = [
141149
"raise NotImplementedError",
142150
"warnings\\.warn",
143151
]
152+
153+
[tool.coverage.paths]
154+
source = [
155+
"niworkflows",
156+
"**/site-packages/niworkflows"
157+
]

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ uv_resolution =
4646
min: lowest-direct
4747

4848
commands =
49-
pytest --cov-report term-missing --pyargs niworkflows --durations=20 --durations-min=1.0 {posargs:-n auto}
49+
pytest --durations=20 --durations-min=1.0 --cov-report term-missing {posargs:-n auto}
5050

5151
[testenv:style]
5252
description = Check our style guide

0 commit comments

Comments
 (0)