diff --git a/tests/test_pipeline_status_tool.py b/tests/test_pipeline_status_tool.py index e34ec25..fba656c 100644 --- a/tests/test_pipeline_status_tool.py +++ b/tests/test_pipeline_status_tool.py @@ -42,10 +42,11 @@ def _gh_available() -> bool: ["gh", "auth", "status"], capture_output=True, check=False, + timeout=10, ).returncode == 0 ) - except FileNotFoundError: + except (FileNotFoundError, subprocess.TimeoutExpired): return False diff --git a/tests/test_project_status_tool.py b/tests/test_project_status_tool.py index 1a7cb8d..8107ce4 100644 --- a/tests/test_project_status_tool.py +++ b/tests/test_project_status_tool.py @@ -39,10 +39,11 @@ def _gh_available() -> bool: ["gh", "auth", "status"], capture_output=True, check=False, + timeout=10, ).returncode == 0 ) - except FileNotFoundError: + except (FileNotFoundError, subprocess.TimeoutExpired): return False diff --git a/tests/test_spec_status_tool.py b/tests/test_spec_status_tool.py index c60c0e9..4dbac2c 100644 --- a/tests/test_spec_status_tool.py +++ b/tests/test_spec_status_tool.py @@ -43,10 +43,11 @@ def _gh_available() -> bool: ["gh", "auth", "status"], capture_output=True, check=False, + timeout=10, ).returncode == 0 ) - except FileNotFoundError: + except (FileNotFoundError, subprocess.TimeoutExpired): return False