Skip to content
Discussion options

You must be logged in to vote

Hi @wonboyn

The fact that the module runs successfully by itself and also works when moved earlier in the suite strongly suggests an order-dependent resource/state problem, although the information in the post is not enough to identify which resource.

I would debug it in this order:

pytest -vv
pytest -vv --setup-show

Then run the hanging test together with progressively smaller subsets of the tests that precede it. That usually identifies the test which leaves behind the problematic state/resource.

For a hang, pytest's built-in faulthandler support is particularly useful. For example in pytest.ini:

[pytest]
faulthandler_timeout = 30

If execution is stuck for 30 seconds, pytest will dump P…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wonboyn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants