Skip to content

Commit d9563d2

Browse files
committed
Switch from timeout-decorator to func_timeout
1 parent 485e4ac commit d9563d2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dev-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ flake8-commas==2.0.0 # Require silicon valley commas
1313
flake8-quotes==3.2.0 # Require single quotes
1414
flake8==3.8.3 # Lint
1515
freezegun==1.0.0 # Freeze time in tests
16+
func-timeout 4.3.5
1617
isort==5.5.4 # Lint imports
1718
keyring==21.4.0
1819
mypy==0.782 # Type checking
@@ -29,7 +30,6 @@ requests-mock-flask==2020.9.25.0
2930
sphinx-autodoc-typehints==1.11.0
3031
sphinx_paramlinks==0.4.2
3132
sphinxcontrib-spelling==5.4.0
32-
timeout-decorator==0.4.1 # Decorate functions to time out.
3333
twine==3.2.0
3434
vulture==2.1
3535
vws-python==2020.9.28.0

tests/mock_vws/test_database_summary.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from time import sleep
1010

1111
import pytest
12-
import timeout_decorator
12+
from func_timeout import func_set_timeout
1313
from vws import VWS, CloudRecoService
1414
from vws.exceptions.vws_exceptions import Fail
1515

@@ -20,7 +20,7 @@
2020
LOGGER.setLevel(logging.DEBUG)
2121

2222

23-
@timeout_decorator.timeout(seconds=500)
23+
@func_set_timeout(timeout=500)
2424
def _wait_for_image_numbers(
2525
vws_client: VWS,
2626
active_images: int,
@@ -47,8 +47,8 @@ def _wait_for_image_numbers(
4747
processing_images: The expected number of processing images.
4848
4949
Raises:
50-
TimeoutError: The numbers of images in various categories do not match
51-
within the time limit.
50+
func_timeout.exceptions.FunctionTimedOut: The numbers of images in
51+
various categories do not match within the time limit.
5252
"""
5353
requirements = {
5454
'active_images': active_images,

0 commit comments

Comments
 (0)