pytest-dev / pytest-timeout

MIT License
206 stars 63 forks source link

Using timeout as a pass criteria, not fail. #82

Closed tfurf closed 11 months ago

tfurf commented 3 years ago

I have a top-level test (near main) that starts up a long-running (indefinite) process, and I want to check that indeed the process runs for a while without crashing. Can pytest-timeout be used for this use case, maybe somehow with pytest-xfail?

Ideally such a test 'passes' if the timeout is reached, but, fails if any other error occurs beforehand.

flub commented 11 months ago

I don't think pytest-timeout is useful for this.