From f7ae97661c16b6eae2d2b35d0235ec5a674a6071 Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Mon, 24 Jun 2024 18:21:28 +0200 Subject: [PATCH] Stop hanging tests after 5min --- brian2/tests/pytest.ini | 3 +++ numpy2.pyproject.toml | 2 +- pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/brian2/tests/pytest.ini b/brian2/tests/pytest.ini index c8a9b88e0..67831b14d 100644 --- a/brian2/tests/pytest.ini +++ b/brian2/tests/pytest.ini @@ -20,3 +20,6 @@ filterwarnings = ignore:BaseException:DeprecationWarning ignore:invalid value:RuntimeWarning ignore:divide by zero:RuntimeWarning + +# Fail tests after 5 minutes +timeout = 300 \ No newline at end of file diff --git a/numpy2.pyproject.toml b/numpy2.pyproject.toml index 534306db4..c9579fceb 100644 --- a/numpy2.pyproject.toml +++ b/numpy2.pyproject.toml @@ -31,7 +31,7 @@ classifiers = [ ] [project.optional-dependencies] -test = ['pytest', 'pytest-xdist>=1.22.3', 'pytest-cov>=2.0'] +test = ['pytest', 'pytest-xdist>=1.22.3', 'pytest-cov>=2.0', 'pytest-timeout'] docs = ['sphinx>=7', 'ipython>=5', 'sphinx-tabs'] [project.urls] diff --git a/pyproject.toml b/pyproject.toml index d95dfcad6..aab005e37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ classifiers = [ ] [project.optional-dependencies] -test = ['pytest', 'pytest-xdist>=1.22.3', 'pytest-cov>=2.0'] +test = ['pytest', 'pytest-xdist>=1.22.3', 'pytest-cov>=2.0', 'pytest-timeout'] docs = ['sphinx>=7', 'ipython>=5', 'sphinx-tabs'] [project.urls]