Skip to content

Closes #4445: add pytest-timeout - #4654

Merged
ajpotts merged 1 commit into
Bears-R-Us:masterfrom
ajpotts:4445_add_pytest-timeout
Jun 24, 2025
Merged

ajpotts merged 1 commit into
Bears-R-Us:masterfrom
ajpotts:4445_add_pytest-timeout

Conversation

@ajpotts

@ajpotts ajpotts commented Jun 23, 2025 •

Copy link
Copy Markdown
Contributor

This PR adds pytest-timeout to the project. pytest-timeout can be used to time out unit tests individually or over the entire project, as listed in the table below. However, it does not work well with ZMQ in multi-locale mode. In that scenario, if one test fail all subsequent tests will fail. Thus, the time out value should be set high enough that it will only be triggered rarely and indicate a serious problem with the tests.

Summary

Approach Usage
Per test @pytest.mark.timeout(5)
Global pytest.ini with timeout = 5
CLI pytest --timeout=5
Fixture Not commonly used; prefer markers or config

Closes #4445: add pytest-timeout

@ajpotts
ajpotts force-pushed the 4445_add_pytest-timeout branch from 19c28f3 to 56c8a3a Compare June 23, 2025 19:31
@ajpotts
ajpotts requested review from bradcray and jaketrookman June 23, 2025 19:35
@ajpotts
ajpotts marked this pull request as ready for review June 23, 2025 19:36

@jaketrookman jaketrookman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@ajpotts
ajpotts force-pushed the 4445_add_pytest-timeout branch from 56c8a3a to 5f1a5cc Compare June 23, 2025 20:18
@vasslitvinov
vasslitvinov self-requested a review June 24, 2025 00:09
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

Successfully merging this pull request may close these issues.

add pytest-timeout

3 participants