Skip to content

Captured stdio output repeating in HTML report #872

Open

Description

@zahmad-optos

My test produces log output using the logging module. In the HTML report, the output lines repeat, and the repetition increases for the number of tests run.

e.g

first test:

---------------------------- Captured stderr setup -----------------------------
2025-02-06 10:26:49,996 - test - DEBUG - Something
2025-02-06 10:26:49,996 - test - DEBUG - Something else

second test

---------------------------- Captured stderr setup -----------------------------
2025-02-06 10:26:49,996 - test - DEBUG - Something
2025-02-06 10:26:49,996 - test - DEBUG - Something
2025-02-06 10:26:49,996 - test - DEBUG - Something else
2025-02-06 10:26:49,996 - test - DEBUG - Something else

using pytest-html>=4.1.1

Activity

  1. adabru commented on Mar 14, 2026

    @adabru

    Hi @zahmad-optos :), can you provide a minimal, working example? I guess it would be around 20-30 lines of code.

  2. zahmad-optos commented on Mar 17, 2026

    @zahmad-optos
    Author

    Hey @adabru. Its been a while since I posted this. I will attempt to create a reproducer, but the original test machine is now in storage. I can try to make a dummy test case. I will get back to this as soon as I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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