Fix and AttributeError on Windows

```
AttributeError: module 'signal' has no attribute 'SIGALRM'. Did you mean: 'SIGABRT'?
```
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2024-01-18 16:46:41 +00:00 committed by Pedro Algarvio
parent f390a4d235
commit 4fbb0f9943
2 changed files with 6 additions and 4 deletions

View file

@ -699,7 +699,8 @@ allowed-3rd-party-modules=msgpack,
packaging,
looseversion,
pytestskipmarkers,
cryptography
cryptography,
pytest_timeout
[EXCEPTIONS]

View file

@ -11,16 +11,17 @@ from datetime import datetime, timedelta
import pytest
import requests
from pytest_timeout import DEFAULT_METHOD
import salt.utils.aws as aws
from tests.support.helpers import patched_environ
from tests.support.mock import MagicMock, patch
pytestmark = [
# Skip testing on windows since it does not support signals
# which is what the timeout marker is using.
# Skip testing on windows since it does not support signal.SIGALRM
# which is what the timeout marker is using by default.
pytest.mark.skip_on_windows,
pytest.mark.timeout(60, method="signal"),
pytest.mark.timeout(60, method=DEFAULT_METHOD),
]