Skip to content

Commit eaf9c0f

Browse files
authored
Fix coverage upload to codecov (#556)
1 parent d6b404d commit eaf9c0f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pyproject.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ rust = "*"
176176
run-mypy = { cmd = "mypy virtualizarr" }
177177
# Using '--dist loadscope' (rather than default of '--dist load' when '-n auto'
178178
# is used), reduces test hangs that appear to be macOS-related.
179-
run-tests = { cmd = "pytest -n auto --dist loadscope --run-network-tests --verbose" }
179+
run-tests = { cmd = "pytest -n auto --dist loadscope --run-network-tests --verbose --durations=10" }
180180
run-tests-no-network = { cmd = "pytest -n auto --verbose" }
181-
run-tests-cov = { cmd = "pytest -n auto --run-network-tests --verbose --cov=term-missing" }
182-
run-tests-xml-cov = { cmd = "pytest -n auto --run-network-tests --verbose --cov-report=xml" }
183-
run-tests-html-cov = { cmd = "pytest -n auto --run-network-tests --verbose --cov-report=html" }
181+
run-tests-cov = { cmd = "pytest -n auto --run-network-tests --verbose --cov=virtualizarr --cov=term-missing" }
182+
run-tests-xml-cov = { cmd = "pytest -n auto --run-network-tests --verbose --cov=virtualizarr --cov-report=xml" }
183+
run-tests-html-cov = { cmd = "pytest -n auto --run-network-tests --verbose --cov=virtualizarr --cov-report=html" }
184184

185185
# Define which features and groups to include in different pixi (similar to conda) environments)
186186
[tool.pixi.environments]
@@ -278,7 +278,10 @@ omit = ["conftest.py", "virtualizarr/tests/*"]
278278

279279
[tool.coverage.report]
280280
exclude_lines = [
281+
"pragma: no cover",
281282
"if TYPE_CHECKING:",
283+
"pragma: ${PY_MAJOR_VERSION} no cover",
284+
'.*\.\.\.' # Ignore "..." lines
282285
]
283286

284287
[tool.pytest.ini_options]

0 commit comments

Comments
 (0)