From 6633f6db16cd695464647b8cc19d9ab521676a61 Mon Sep 17 00:00:00 2001 From: dalthviz Date: Mon, 23 May 2022 14:16:48 -0500 Subject: [PATCH] Tests: Use pytest-timeout and set timeout to 120 secs --- binder/environment.yml | 1 + requirements/tests.txt | 1 + runtests.py | 2 +- setup.py | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/binder/environment.yml b/binder/environment.yml index 40ebc5ddafb..af98842d69a 100644 --- a/binder/environment.yml +++ b/binder/environment.yml @@ -64,6 +64,7 @@ dependencies: - pytest-mock - pytest-order - pytest-qt +- pytest-timeout - pyyaml - scipy - sympy diff --git a/requirements/tests.txt b/requirements/tests.txt index e483fa69e50..5218f11f051 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -14,6 +14,7 @@ pytest-lazy-fixture pytest-mock pytest-order pytest-qt +pytest-timeout pyyaml scipy sympy diff --git a/runtests.py b/runtests.py index 9089361d4af..edd9bb7c160 100644 --- a/runtests.py +++ b/runtests.py @@ -33,7 +33,7 @@ def run_pytest(run_slow=False, extra_args=None): """Run pytest tests for Spyder.""" # Be sure to ignore subrepos pytest_args = ['-vv', '-rw', '--durations=10', '--ignore=./external-deps', - '-W ignore::UserWarning'] + '-W ignore::UserWarning', '--timeout=120'] if CI: # Exit on first failure and show coverage diff --git a/setup.py b/setup.py index e4f2bee6035..2268e814ffa 100644 --- a/setup.py +++ b/setup.py @@ -269,6 +269,7 @@ def run(self): 'pytest-mock', 'pytest-order', 'pytest-qt', + 'pytest-timeout', 'pyyaml', 'scipy', 'sympy',