Skip to content

Commit

Permalink
Merge pull request #108 from stuartmaxwell:pytest-cov
Browse files Browse the repository at this point in the history
Pytest-cov
  • Loading branch information
stuartmaxwell authored Jan 30, 2025
2 parents 9fe97b8 + b1031c0 commit 5d069f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 3 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,12 @@ BUILDDIR := "docs/_build"

# Run coverage
@cov:
{{uv}} coverage run -m pytest
{{uv}} coverage report -m
{{uv}} -m pytest --cov

# Run coverage
@cov-html:
{{uv}} coverage run -m pytest
{{uv}} coverage html
{{uv}} -m pytest --cov --cov-report=html --cov-context=test
echo Coverage report: file://`pwd`/htmlcov/index.html

# Sync the package
@sync:
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ test = [
"django-debug-toolbar>=4.4.0",
"nox>=2024.4.15",
"djpress-example-plugin",
"pytest-cov>=6.0.0",
]
docs = [
"cogapp>=3.4.1",
Expand Down Expand Up @@ -91,6 +92,9 @@ pythonpath = ". example"
DJANGO_SETTINGS_MODULE = "config.settings_testing"
python_files = "tests.py test_*.py *_tests.py"

[tool.coverage.html]
show_contexts = true

[tool.coverage.run]
branch = true
include = ["src/djpress/*"]
Expand Down
2 changes: 2 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5d069f6

Please sign in to comment.