Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ease pytest-xdist usage #36

Closed
smarie opened this issue Feb 14, 2020 · 1 comment
Closed

Ease pytest-xdist usage #36

smarie opened this issue Feb 14, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@smarie
Copy link
Owner

smarie commented Feb 14, 2020

As per suggestion from @larsks in #34: current support for pytest-xdist is still a bit complex: users have to follow the example [conftest.py`](https://smarie.github.io/python-pytest-harvest/#pytest-x-dist).

We could do several things to improve this :

  • we could implement the pytest_sessionfinish hook with a "execute last" and if we are in a xdist worker, automatically persist all saved fixtures and report items - and if we are in the xdist master, automatically delete all saved fixtures and report items

  • in the get_synthesis_dct base method, if we are the xdist master, we should retrieve previously persisted data and use it instead of the saved fixtures and report items

The final user experience would be that they can use the get_session_results_df() method in the pytest_sessionfinish hook, without caring about persistence and sharing across workers

@smarie
Copy link
Owner Author

smarie commented Feb 19, 2020

@larsks this is now available in 1.9.0. I would appreciate any feedback about the new simplified user experience! See documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant