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

Are timeouts supposed to result in Error or Failure or both? #171

Open
kaddkaka opened this issue Mar 22, 2024 · 5 comments
Open

Are timeouts supposed to result in Error or Failure or both? #171

kaddkaka opened this issue Mar 22, 2024 · 5 comments

Comments

@kaddkaka
Copy link

kaddkaka commented Mar 22, 2024

I'm running a smaller testsuite and moste of the tests fail 10 seconds timeout because of slow setup code (currently residing inside the tests). Some of the timeouted tests result in Error some in Failure:

FAILED base/software/test_external_call.py::TestExtCall::test_can_call_external_lib[/local/path.slow-mode] - Failed: Timeout >10.0s
ERROR base/software/test_external_call.py::TestExtCall::test_can_call_external_lib[/local/path.fast-mode] - Failed: Timeout >10.0s

Why? Is this intentional?

If I increase my timeout the ERRORs seem to go away and all timeouted tests are listed as FAILUREs.

@RonnyPfannschmidt
Copy link
Member

pytest considers exception/errors in setup/teardown an error (as that shouldnt happen)
if it happens in a test, its as expected

i beleive timeout should transition to a new outcome type as a timeout is more similar to a xfail

@kaddkaka
Copy link
Author

pytest considers exception/errors in setup/teardown an error (as that shouldnt happen) if it happens in a test, its as expected

i beleive timeout should transition to a new outcome type as a timeout is more similar to a xfail

That sounds reasonable and "Timeout" outcome sounds good. Is there work ongoing or another issue to link this one to?

@RonnyPfannschmidt
Copy link
Member

Not yet

@flub
Copy link
Member

flub commented Mar 25, 2024 via email

@The-Compiler
Copy link
Member

I believe plugins can set any outcome as long as they handle it appropriately in a pytest_report_teststatus.

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

4 participants