pkgs/*: Remove pytest coverage testing from every single test run

There was no noticeable positive impact from having coverage reports on
every single test run.

While adding a separate command to check coverage might be added in the
future, the overhead of collecting the coverage for every test run made
seems not worth it currently.
This commit is contained in:
a-kenji
2025-06-11 15:05:56 +02:00
committed by DavHau
parent 1132185b7d
commit 80ad10b8e5
7 changed files with 4 additions and 14 deletions

View File

@@ -53,7 +53,6 @@ let
[ [
# Testing framework # Testing framework
ps.pytest ps.pytest
ps.pytest-cov # Generate coverage reports
ps.pytest-subprocess # fake the real subprocess behavior to make your tests more independent. ps.pytest-subprocess # fake the real subprocess behavior to make your tests more independent.
ps.pytest-xdist # Run tests in parallel on multiple cores ps.pytest-xdist # Run tests in parallel on multiple cores
ps.pytest-timeout # Add timeouts to your tests ps.pytest-timeout # Add timeouts to your tests

View File

@@ -25,7 +25,7 @@ testpaths = "tests"
faulthandler_timeout = 60 faulthandler_timeout = 60
log_level = "DEBUG" log_level = "DEBUG"
log_format = "%(levelname)s: %(message)s\n %(pathname)s:%(lineno)d::%(funcName)s" log_format = "%(levelname)s: %(message)s\n %(pathname)s:%(lineno)d::%(funcName)s"
addopts = "--cov . --cov-report term --cov-report html:.reports/html --no-cov-on-fail --durations 5 --color=yes --new-first" # Add --pdb for debugging addopts = "--durations 5 --color=yes --new-first" # Add --pdb for debugging
norecursedirs = "tests/helpers" norecursedirs = "tests/helpers"
markers = ["impure"] markers = ["impure"]

View File

@@ -28,7 +28,6 @@ let
ps: ps:
[ [
ps.pytest ps.pytest
ps.pytest-cov
ps.pytest-subprocess ps.pytest-subprocess
ps.pytest-xdist ps.pytest-xdist
ps.pytest-timeout ps.pytest-timeout

View File

@@ -36,7 +36,7 @@ testpaths = ["tests", "clan_cli", "clan_lib"]
faulthandler_timeout = 240 faulthandler_timeout = 240
log_level = "DEBUG" log_level = "DEBUG"
log_format = "%(message)s" log_format = "%(message)s"
addopts = "--cov . --cov-report term --cov-report html:.reports/html --no-cov-on-fail --durations 5 --color=yes --new-first -W error -n auto" # Add --pdb for debugging addopts = "--durations 5 --color=yes --new-first -W error -n auto" # Add --pdb for debugging
norecursedirs = ["clan_cli/tests/helpers", "clan_lib/nixpkgs"] norecursedirs = ["clan_cli/tests/helpers", "clan_lib/nixpkgs"]
# All tests which evaluate any nix library code from clan-core need to use the # All tests which evaluate any nix library code from clan-core need to use the
# `with_core` marker, so basically all tests which evaluate a flake with # `with_core` marker, so basically all tests which evaluate a flake with
@@ -47,12 +47,6 @@ markers = ["impure", "with_core"]
filterwarnings = "default::ResourceWarning" filterwarnings = "default::ResourceWarning"
python_files = ["test_*.py", "*_test.py"] python_files = ["test_*.py", "*_test.py"]
# TODO: cov seems to conflict with xdist
# [tool.coverage.run]
# branch = true
# source = ["clan_lib"]
# omit = ["*/tests/*", "*/test_*.py", "*/*_test.py", "*/conftest.py", "docs.py"]
[tool.mypy] [tool.mypy]
python_version = "3.12" python_version = "3.12"
warn_redundant_casts = true warn_redundant_casts = true

View File

@@ -10,7 +10,6 @@
pygobject-stubs, pygobject-stubs,
pygobject3, pygobject3,
pytest, # Testing framework pytest, # Testing framework
pytest-cov, # Generate coverage reports
pytest-subprocess, # fake the real subprocess behavior to make your tests more independent. pytest-subprocess, # fake the real subprocess behavior to make your tests more independent.
pytest-timeout, # Add timeouts to your tests pytest-timeout, # Add timeouts to your tests
pytest-xdist, # Run tests in parallel on multiple cores pytest-xdist, # Run tests in parallel on multiple cores
@@ -62,7 +61,6 @@ let
++ runtimeDependencies ++ runtimeDependencies
++ [ ++ [
pytest # Testing framework pytest # Testing framework
pytest-cov # Generate coverage reports
pytest-subprocess # fake the real subprocess behavior to make your tests more independent. pytest-subprocess # fake the real subprocess behavior to make your tests more independent.
pytest-xdist # Run tests in parallel on multiple cores pytest-xdist # Run tests in parallel on multiple cores
pytest-timeout # Add timeouts to your tests pytest-timeout # Add timeouts to your tests

View File

@@ -25,7 +25,7 @@ testpaths = "tests"
faulthandler_timeout = 60 faulthandler_timeout = 60
log_level = "DEBUG" log_level = "DEBUG"
log_format = "%(levelname)s: %(message)s\n %(pathname)s:%(lineno)d::%(funcName)s" log_format = "%(levelname)s: %(message)s\n %(pathname)s:%(lineno)d::%(funcName)s"
addopts = "--cov . --cov-report term --cov-report html:.reports/html --no-cov-on-fail --durations 5 --color=yes --new-first" # Add --pdb for debugging addopts = "--durations 5 --color=yes --new-first" # Add --pdb for debugging
norecursedirs = "tests/helpers" norecursedirs = "tests/helpers"
markers = ["impure"] markers = ["impure"]

View File

@@ -22,7 +22,7 @@ testpaths = "tests"
faulthandler_timeout = 60 faulthandler_timeout = 60
log_level = "DEBUG" log_level = "DEBUG"
log_format = "%(levelname)s: %(message)s\n %(pathname)s:%(lineno)d::%(funcName)s" log_format = "%(levelname)s: %(message)s\n %(pathname)s:%(lineno)d::%(funcName)s"
addopts = "--cov . --cov-report term --cov-report html:.reports/html --no-cov-on-fail --durations 5 --color=yes --new-first" # Add --pdb for debugging addopts = "--durations 5 --color=yes --new-first" # Add --pdb for debugging
norecursedirs = "tests/helpers" norecursedirs = "tests/helpers"
[tool.mypy] [tool.mypy]