pytest-dev / pytest-dev/pytest-html

report.html is created at the start of pytest run instead of after in v4

Open
#796 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
779
Forks
260
PR merge metrics
No merged PRs in 30d

Description

We run two containers in one pod. One container runs a bash script that checks the existence of the report.html then shuts the pods down after uploading the html file to azure blob storage. The second container runs the pytest command.

Due to the change in report.html being created at the start of the pytest run now, it no longer waits for the test on the second container to finish. It uploads the unfinished version of the report instead.

As this is a breaking change, could you please make a note of this in the release notes or maybe fix this by making a temporary file in /tmp then move it to the report directory at the end of the test

Part of the script:

while [ ! -f /tmp/report.html ]; do
    sleep 2
done

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin with the pytest command and the /tmp/report.html polling loop described in the issue, then trace the plugin's report-file lifecycle. Done means the waiting container does not observe an unfinished report, or the release notes explicitly document the v4 timing change.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.