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

[info] pytest-xdist worker crash then log something #847

Closed
jay746 opened this issue Nov 23, 2022 · 2 comments
Closed

[info] pytest-xdist worker crash then log something #847

jay746 opened this issue Nov 23, 2022 · 2 comments

Comments

@jay746
Copy link

jay746 commented Nov 23, 2022

I have a usecases where if worker crashes i want to collect some info and dump in log file, so that i can debug.
i tried to search the doc of pytest-xdist and some google but couldn't find anything.
Do we have any hooks that can be called from conftest to dump after the worker crashes?
or any other way possible?
Thanks in advance for help and nice tool development.

@darugnaa
Copy link

You can try with pytest_handlecrashitem(crashitem: Any, report: Any, sched: Any) and pytest_testnodedown(node: Any, error: Any) hooks. There isn't much documentation about them.

See

def pytest_handlecrashitem(crashitem, report, sched):

@jay746
Copy link
Author

jay746 commented Jun 12, 2023

Thanks @darugnaa for your input. This helps my requirements.

@jay746 jay746 closed this as completed Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants