pytest-html icon indicating copy to clipboard operation
pytest-html copied to clipboard

Unescape logs section to display custom html logs

Open MartykQ opened this issue 3 years ago • 1 comments
trafficstars

Is there a way to disable html escaping to display custom logs directly from logging.info()

Example:


def test_abcd(f1):
    assert 3 > 1, "always passes"
    logging.info("<div>Custom div text</div>")   

it is displayed as a raw text in the html report, but I would like to have it displayed as a separate div

MartykQ avatar Aug 30 '22 12:08 MartykQ

Probably this https://pytest-html.readthedocs.io/en/latest/user_guide.html#extra-content (extra.html)

or maybe this https://pytest-html.readthedocs.io/en/latest/user_guide.html#modifying-the-results-table

BeyondEvil avatar Aug 31 '22 10:08 BeyondEvil

Closing this for lack of interaction. Feel free to re-open.

BeyondEvil avatar Mar 05 '23 16:03 BeyondEvil