Skip to content

Defer html generation until after testrun is complete #142

@noamkremen

Description

@noamkremen

Hi,
I currently have a scenario where a report row needs to be augmented with links to log files collected via a setup/teardown fixture. I'm trying to achieve this via the pytest_runtest_makereport hook but as far as I understand, this is not currently possible since:
A) append_failed/passed only run for report.when=='call', thus no report rows are generated for teardown/setup.
B) Keeping a reference to the call phase report (during pytest_runtest_makereport) and then adding extras to it during the teardown phase report is useless since the relevant row html has already been generated by _appendrow.

Do I understand the limitations correctly? If so, will you be open to considering a PR that allows addition of rows for setup/teardown phases and defers html generation until the testrun has been completed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions