-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibly allowing better extensibility to html output #310
Comments
I'd be happy to review a PR! We can always create a new breaking/major release. 👍 @memetb |
@BeyondEvil I've done a full feature including documentation upate in the PR #311. Let me know if you have any concerns. Thank you. |
I just thought that I should add that I’ve developed a plug-in for generating reports using template engines as an alternative for those occasions you find yourself needing to do more heavy customization. It allows you to make a report from scratch or inherit an existing template and override parts of it. pytest-reporter Sorry for the unsolicited advertisement. 🙄 |
Hey, thanks @christiansandberg. That looks quite nice at a glance. I will review it when I get some cycles. |
maybe a switchable template should be used, instead of hooks/extends. having the HTML generated via a template engine allowes better readability of output generators and does not need knowledge of python to apply changes of the outcome. if there was a switch to use an own template instead of the shipped one would allow alternative output for everybody. |
@jkowalleck see my earlier reply for a template based alternative. I also think there is a plan to switch pytest-html to JavaScript which hopefully will allow customization in the future. |
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:
content
summary
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.
The text was updated successfully, but these errors were encountered: