Open jmrgibson opened 3 years ago
Hi @jmrgibson, thanks for submitting this issue ! Indeed results_path
is not unique per process: https://github.com/smarie/python-pytest-harvest/blob/86a259bcb7ac09a643d42a447d7c2e791e403159/pytest_harvest/plugin.py#L398
That is currently documented here: https://smarie.github.io/python-pytest-harvest/#pytest-x-dist
We'll probably need to change this. Do you have an alternative in mind ? Maybe as simple as appending os.getpid()
to that path ?
I've implement the hooks on my side using a tempdir, which also helps with cleanup as the space gets reclaimed when the process exits.
I can make that the default and put up a PR if that suits.
On Thu, Dec 10, 2020, 9:33 PM Sylvain Marié notifications@github.com wrote:
Hi @jmrgibson https://github.com/jmrgibson, thanks for submitting this issue ! Indeed results_path is not unique per process: https://github.com/smarie/python-pytest-harvest/blob/86a259bcb7ac09a643d42a447d7c2e791e403159/pytest_harvest/plugin.py#L398
That is currently documented here: https://smarie.github.io/python-pytest-harvest/#pytest-x-dist
We'll probably need to change this. Do you have an alternative in mind ? Maybe as simple as appending os.getpid() to that path ? If so, do not hesitate to propose a PR. Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/smarie/python-pytest-harvest/issues/46#issuecomment-742367746, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NBMYHJ6G3RUALLNCUNJLSUCBVDANCNFSM4US3B4DA .
This seems like a viable alternative. However I am concerned with debugging. Most users won't be aware that this temp dir is created behind the scenes, and therefore will not be able to perform a bit of debugging themselves by inspecting the files created inside.
Even if this is less elegant, is there any drawback that you might see with appending the process number to this dir name ?
I'm trying to weight one against the other... puzzling
Neat plugin, great docs. I'm running into the following issue, outlined below:
Scenario:
stacktrace:
How is
self.results_path
generated? it it unique per process? or would it be shared if I was running two copies of pytest simultaneously, thus leading to the following error?EDIT: I should probably mention I'm only using the following hook in my root conftest.py