Skip to content

Possibly allowing better extensibility to html output #310

Open
@memetb

Description

@memetb

Hi,

I make use of pytest-html extensively and find the plugin generally fantastic.

In my usage, I have resorted to some substantial modifications to the output content. Recently I found myself going a bit too far and running regexes on output to alter them.

I think the following surgical changes would go a long way in avoiding such poor practices:

  • Wrapping body content in a div with class content
  • wrapping header in a div with class summary
  • and wrapping the results in a div with class results

The principal motivation of this would be to allow styling the output.

I think the biggest concern would be whether this will break a bunch of CI tests in the universe that have come to rely on the html output.

I apologize if this is a common request that gets closed repeatedly. I searched around in the issues but didn't find anything specifically asking this.

All three of these changes are trivial to implement and I could easily make a PR on short notice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis issue/PR relates to a feature request.proposalThis issue/PR is meant to gather feedback on an idea/change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions