Closed jaswithareddyg closed 6 months ago
You'll need to provide more information about which version of pytest, pytest-timeout, how you installed etc.
The line assert hasattr(signal, 'SIGALRM')
does not even occur in the source code at all, never mind the line number. If it were to exist, it would indeed not work on windows since SIGALRM does not exist on windows afaik. But I don't think this code is an unmodified pytest-timeout install based on just this traceback.
from the filename in the stacktrace it looks like they've installed pytest-timeouts, a distinct package from this one. Indeed, the repo for that package contains the code in the provided stacktrace
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "C:\venv\Lib\site-packages\_pytest\main.py", line 264, in wrap_session
INTERNALERROR> config._do_configure()
INTERNALERROR> File "C:\venv\Lib\site-packages\_pytest\config\__init__.py", line 996, in _do_configure
INTERNALERROR> self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR> File "C:\venv\Lib\site-packages\pluggy\_hooks.py", line 514, in call_historic
INTERNALERROR> res = self._hookexec(self.name, self._hookimpls, kwargs, False)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "C:\venv\Lib\site-packages\pluggy\_manager.py", line 115, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "C:\venv\Lib\site-packages\pluggy\_callers.py", line 113, in _multicall
INTERNALERROR> raise exception.with_traceback(exception.__traceback__)
INTERNALERROR> File "C:\venv\Lib\site-packages\pluggy\_callers.py", line 77, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "C:\venv\Lib\site-packages\pytest_timeouts.py", line 57, in pytest_configure
INTERNALERROR> assert hasattr(signal, 'SIGALRM')
INTERNALERROR> AssertionError: assert False
INTERNALERROR> + where False = hasattr(signal, 'SIGALRM')
I am unsure what is causing the error. I tried reinstalling pytest and python but nothing helped. I am on Windows 11.