Skip to content

fix: ignore non-Python sources in HTML reports - #756

Open
daleselaji-dev wants to merge 1 commit into
pytest-dev:masterfrom
daleselaji-dev:codex/fix-html-report-template-parsing
Open

fix: ignore non-Python sources in HTML reports#756
daleselaji-dev wants to merge 1 commit into
pytest-dev:masterfrom
daleselaji-dev:codex/fix-html-report-template-parsing

Conversation

@daleselaji-dev

Copy link
Copy Markdown

Purpose

Avoid an internal error when coverage data includes executable code compiled from a non-Python source such as a Jinja template. The default HTML report now limits its input to Python files when no source or include filter is configured.

The regression test records executable code under a .jinja2 filename while keeping the test independent of Jinja2.

References

Closes #748

Verification

  • python -m pytest -q tests/test_pytest_cov.py -k 'test_html'
  • python -m ruff check src tests/test_pytest_cov.py
  • git diff --check

The full suite was started locally but exceeded the 180-second execution limit without producing a test failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

INTERNALERROR when generating html report using pytest-cov 7.1.0 with jinja

1 participant