diff --git a/pytest.ini b/pytest.ini index cccc62e404..1ac313922a 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,2 +1,5 @@ [pytest] norecursedirs = extra +timeout = 180 +timeout_method = thread +timeout_func_only = true diff --git a/setup.py b/setup.py index 9ebfda1ba9..68361d650f 100644 --- a/setup.py +++ b/setup.py @@ -12,6 +12,7 @@ testing_minimal = [ "torch==2.7.1", "pytest", "pytest-xdist", + "pytest-timeout", "hypothesis", "z3-solver", "ml_dtypes"