diff --git a/appveyor.yml b/appveyor.yml index c41c288b23e..0044dbbf59b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,7 +13,7 @@ environment: rope pyflakes sphinx pygments pylint pycodestyle psutil nbconvert qtawesome pickleshare qtpy pyzmq chardet mock pandas pytest pytest-cov numpydoc scipy pillow qtconsole matplotlib jedi - PIP_DEPENDENCIES: "pytest-qt flaky" + PIP_DEPENDENCIES: "pytest-qt pytest-timeout flaky" matrix: - PYTHON_VERSION: "2.7" @@ -41,4 +41,4 @@ install: build: false test_script: - - "%CMD_IN_ENV% python runtests.py" + - "%CMD_IN_ENV% python runtests.py" || "%CMD_IN_ENV% python runtests.py" || "%CMD_IN_ENV% python runtests.py" diff --git a/continuous_integration/travis/install.sh b/continuous_integration/travis/install.sh index fa51932f38f..0a63f33ec96 100755 --- a/continuous_integration/travis/install.sh +++ b/continuous_integration/travis/install.sh @@ -10,7 +10,7 @@ else export CONDA_DEPENDENCIES="rope pyflakes sphinx pygments pylint psutil nbconvert \ qtawesome pickleshare qtpy pyzmq chardet mock nomkl pandas \ pytest pytest-cov numpydoc scipy cython pillow jedi pycodestyle" - export PIP_DEPENDENCIES="coveralls pytest-qt flaky" + export PIP_DEPENDENCIES="coveralls pytest-qt pytest-timeout flaky" fi diff --git a/requirements/test_requirements.txt b/requirements/test_requirements.txt index f70b75dddbe..688a544b11f 100644 --- a/requirements/test_requirements.txt +++ b/requirements/test_requirements.txt @@ -2,6 +2,7 @@ mock pytest pytest-qt pytest-cov +pytest-timeout pandas scipy sympy diff --git a/setup.py b/setup.py index 28a5c646a5d..f40482563bd 100644 --- a/setup.py +++ b/setup.py @@ -301,6 +301,7 @@ def run(self): 'pytest-qt', 'pytest-cov', 'pytest-xvfb', + 'pytest-timeout', 'mock', 'flaky', 'pandas', diff --git a/spyder/app/tests/test_mainwindow.py b/spyder/app/tests/test_mainwindow.py index 7f50d7b1068..e71f0d05e14 100644 --- a/spyder/app/tests/test_mainwindow.py +++ b/spyder/app/tests/test_mainwindow.py @@ -133,6 +133,7 @@ def test_change_types_in_varexp(main_window, qtbot): @flaky(max_runs=3) @pytest.mark.skipif(os.name != 'nt' or not PY2, reason="It times out on Linux and Python 3") +@pytest.mark.timeout(timeout=60, method='thread') @pytest.mark.use_introspection def test_calltip(main_window, qtbot): """Hide the calltip in the editor when a matching ')' is found."""