pytest-dev / pytest-dev/pytest-html
User Guide: Html tags description
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 779
- Forks
- 260
- PR merge metrics
- No merged PRs in 30d
Description
in user guide many examples refer to html tags in strings as:
https://pytest-html.readthedocs.io/en/latest/user_guide.html#additional-summary-information
def pytest_html_results_summary(prefix, summary, postfix):
prefix.extend(["<p>foo: bar</p>"])
by doing that, the <p> tag as well as other html tags (e.g. <div> or <h2>) are recognized as text.
The correct example would be to use py.xml package:
from py.xml import html
def pytest_html_results_summary(prefix, summary, postfix):
prefix.extend([html.p("foo: bar")])
Another useful example would be the one to add a log to the Results Summary:
from py.xml import html
def pytest_html_results_summary(prefix, summary, postfix):
postfix.extend([html.div("My additional log", class_='log')])
the User Guide shall be updated according to the correct html way to add information to the report sections.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the User Guide at the Additional Summary Information section linked in the issue and review its HTML examples. Update the examples to use py.xml.html elements, including the results summary and additional log examples; done means the guide shows the corrected HTML construction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100