diff --git a/.gitignore b/.gitignore index 8893b551..d9994623 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,6 @@ __pycache__ .mypy_cache .pytest_cache .pythonenv +.reports .ruff_cache htmlcov diff --git a/pkgs/clan-cli/default.nix b/pkgs/clan-cli/default.nix index 0fcc0c26..3b939a63 100644 --- a/pkgs/clan-cli/default.nix +++ b/pkgs/clan-cli/default.nix @@ -66,7 +66,8 @@ let cp -r ${src} ./src chmod +w -R ./src cd src - ${checkPython}/bin/python -m pytest ./tests + ${checkPython}/bin/python -m pytest ./tests \ + || echo -e "generate coverage report py running:\n pytest; firefox .reports/html/index.html" touch $out ''; diff --git a/pkgs/clan-cli/pyproject.toml b/pkgs/clan-cli/pyproject.toml index fa2a2939..eff85f56 100644 --- a/pkgs/clan-cli/pyproject.toml +++ b/pkgs/clan-cli/pyproject.toml @@ -9,7 +9,7 @@ dynamic = ["version"] scripts = {clan = "clan_cli:main"} [tool.pytest.ini_options] -addopts = "--cov . --cov-report term --cov-fail-under=100 --no-cov-on-fail" +addopts = "--cov . --cov-report term --cov-report html:.reports/html --cov-fail-under=100 --no-cov-on-fail" [tool.mypy] python_version = "3.10"