pytest-html
pytest-html copied to clipboard
report.html is created at the start of pytest run instead of after in v4
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
Can you try using the master branch?
That was fixed in: https://github.com/pytest-dev/pytest-html/pull/754
And released in 4.1.0.
@BeyondEvil are you sure it was fixed correctly? I updated to 4.1.1 and report file is still generated at the beginning but isn't updated until the end