pytest-dev / pytest-timeout

MIT License
216 stars 64 forks source link

Timeout on one test aborts following tests? #25

Closed pytest-timeout-bot closed 6 years ago

pytest-timeout-bot commented 6 years ago

Original report by LemonPi (Bitbucket: LemonPi, GitHub: LemonPi).


Currently if one test fails on a timeout, all other tests are aborted. Is this intended? Is it possible to execute the other tasks?

I'm using python 3.6.5 on windows with pytest 3.6.0

Sample code:

#!python

@pytest.mark.timeout(1)
def test_fail():
    while True:
        pass

def test_should_run():
    pass

test_should_run is never run

pytest-timeout-bot commented 6 years ago

Original comment by Floris Bruynooghe (Bitbucket: flub, GitHub: flub).


I'm afraid this is working correctly. Windows does not support the signal method and thus it can only use the thread method. The readme describes the consequences of this, which is what you're seeing.

pytest-timeout-bot commented 6 years ago

Original comment by Floris Bruynooghe (Bitbucket: flub, GitHub: flub).


Yuk, bitbucket's wording of "invalid" is horrible.