pytest-mpl
pytest-mpl copied to clipboard
Issue to generate correctly html repport while using xdist options
Hello I'm using the mpl packages to enable the comparison for hundread of images. This process takes a while in sequential mode
so I have decided to use the xdist plugin in pytest. When I'm combining mpl and xdist plugins it works well and I have my tests that are really speed up. However I wanted to generate this html report and unfortunately it does not work, I get empty pages (see image bellow) with no files shown, even if in the result directory I get the directories containing images of basefile and results.
I have done this command line
pytest -n 6 --mpl --mpl-baseline-path=baseline --mpl-results-path=results --mpl-generate-summary=html,json --mpl-use-full-test-name
Here is my informations about my packages bellow
platform linux -- Python 3.12.9, pytest-8.3.4, pluggy-1.5.0
Matplotlib: 3.10.0
Freetype: 2.12.1
rootdir: /home/claplace/project/pysat
plugins: mpl-0.17.0, xdist-3.6.1, mock-3.14.0
If I remove the -n 6 option which is from xdist to enable to parralelise test on 6 cores the html repport is working well.
So I wanted to know if there is a way to handle the html repport generation correctly while using xdist ?
Hi @ClementLaplace, unfortunately reports cannot be generated correctly when using pytest-xdist. I looked into this before but couldn't find an obvious simple fix, but I'm sure a fix exists! #136
@ConorMacBride thanks for your awnser and your work on this plugin.