diff options
author | Jordan Cook <jordan.cook@pioneer.com> | 2021-06-03 16:29:32 -0500 |
---|---|---|
committer | Jordan Cook <jordan.cook@pioneer.com> | 2021-06-03 16:34:17 -0500 |
commit | 14b396d174cde98c7cbbb21b8b9381cda679cb05 (patch) | |
tree | a6444c604bf590da3ab5e10d213a15f16e4f5d9e /tests/conftest.py | |
parent | b27d52d35d3d24d390cdd2f14ccc736ad1c96a51 (diff) | |
download | requests-cache-14b396d174cde98c7cbbb21b8b9381cda679cb05.tar.gz |
For Windows compatibility, use multiprocessing timeouts instead of process signals with timeout_decorator
Diffstat (limited to 'tests/conftest.py')
-rw-r--r-- | tests/conftest.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index c55c942..a3fb32d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -223,12 +223,8 @@ def fail_if_no_connection(func) -> bool: @wraps(func) def wrapper(*args, **kwargs): try: - timeout(1.0)(func)(*args, **kwargs) + timeout(1.0, use_signals=False)(func)(*args, **kwargs) except Exception as e: - # timeout_decorator is not Windows compatible, because it relies on process signals that - # don't exist in windows. This is an escape valve for that specific error. - if isinstance(e, AttributeError) and str(e) == "module 'signal' has no attribute 'SIGALRM'": - return logger.error(e) pytest.fail('Could not connect to backend') |