snapshottest icon indicating copy to clipboard operation
snapshottest copied to clipboard

xdist support

Open martijnthe opened this issue 5 years ago • 2 comments

Thanks for creating snapshottest!

We're using xdist to distribute test runs to multiple processes.

xdist will happily distribute tests from a single .py file to different processes. If I'm not mistaken, there will be a separate book-keeping in each process on what snapshot has been used or not. I did not see any code that would prevent this.

In the case tests from a single file are distributed to different processes, the result of --snapshot-update will be incorrect.

Can you confirm this is a problem?

martijnthe avatar Jan 17 '20 19:01 martijnthe

Why is the result of --snapshot-update incorrect when the tests are spawned out to subprocesses? It would be helpful if you could create a repo that illustrates the problem.

I wonder if the fix might be to provide a way to pass this option through an environment variable, which subprocesses would then automatically inherit.

paulmelnikow avatar Sep 29 '20 02:09 paulmelnikow

Related to #56

paulmelnikow avatar Sep 29 '20 02:09 paulmelnikow