pytest-dev / pytest-timeout

MIT License
216 stars 64 forks source link

Pytest 6.0.0rc1 - ValueError: invalid version number '6.0.0rc1' raised when using thread timeout method #74

Closed filwie closed 4 years ago

filwie commented 4 years ago

On Pytest 6.0.0rc1 with timeout method is set to thread (signal works correctly) below exception occurs each time a timeout is expected:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pytest_timeout.py", line 384, in timeout_timer
    pytest_version = StrictVersion(pytest.__version__)
  File "/usr/local/lib/python3.7/distutils/version.py", line 40, in __init__
    self.parse(vstring)
  File "/usr/local/lib/python3.7/distutils/version.py", line 137, in parse
    raise ValueError("invalid version number '%s'" % vstring)
ValueError: invalid version number '6.0.0rc1'
flub commented 4 years ago

Which version of pytest-timeout are you using? I believe this was fixed in #69 and a new version with that has been released already.

Also any reason you're still using pytest rc1? 6.0 was released a while ago?