pytest and pytest-xdist plugin with --snapshot-update -n auto
deletes all snapshots on parallel executions
#9600
Labels
--snapshot-update -n auto
deletes all snapshots on parallel executions
#9600
Description
Currently working on optimizing some pipelines where I discovered that pytest + pytest-xdist behaves different with the
-n
flag combined with--snapshot-update
. The issue arised while usingtox
, but is replicated with onlypytest
,pytest-xdist
andsyrupy
. A minimal codebase is provided to replicate the results further down.Actual outcome
All snapshots (new and old) are deleted when tests are run with
--snapshot-update -n auto
Expected outcome
All old snapshots should not be deleted and a new snapshot should be added with
--snapshot-update -n auto
Steps to reproduce
pytest --snapshot-update
pytest --snapshot-update -n auto
to run tests in parallel, which deletes snapshotsScreenshot of steps
System information
piplist.txt
requirements.txt
Full code/minimum example: codebase.zip
The text was updated successfully, but these errors were encountered: