Skip to content

Conversation

danceratopz
Copy link
Member

@danceratopz danceratopz commented Aug 14, 2025

🗒️ Description

A suggestion to:

Respectively alternative to:

This:

  • Uses a hook wrapper to make sure that we delete the directory after the pytest-html plugin has written its html output.
  • Filters out the pytest-html "Generated html report:" line from the summary to avoid confusion.

The whole thing is hacky, but it's a better solution than #2014 imo:

  • The logic in pytest_terminal_summary is worse/more complex.
  • The logic in ptyest_sessionfinish is slightly better.

If we want to be less hacky, then the other option is to stop generating html by default.

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlint
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered adding an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).

I.e., don't print "`----------- Generated html report: file:///home...`" in the terminal summary as we delete the report in `pytest_sessionfinish()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:fill Scope: fill command type:chore Type: Chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant