From 43b8ecd172dbe9a7d8e20cf9fb019d6378a84c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Muhammet=20Eren=20Karaku=C5=9F?= Date: Mon, 16 Mar 2026 18:32:56 +0300 Subject: [PATCH] fix(tests): use case-insensitive regex in singularity preflight tests pytest.raises(match=...) is case-sensitive by default. The error message starts with "Neither" (capital N) but the regex used lowercase "neither", causing CI failures on Linux. --- tests/tools/test_singularity_preflight.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tools/test_singularity_preflight.py b/tests/tools/test_singularity_preflight.py index c9ece8751..0ba50c3e9 100644 --- a/tests/tools/test_singularity_preflight.py +++ b/tests/tools/test_singularity_preflight.py @@ -39,7 +39,7 @@ class TestFindSingularityExecutable: def test_raises_when_neither_found(self): """Must raise RuntimeError with install instructions.""" with patch("shutil.which", return_value=None): - with pytest.raises(RuntimeError, match="neither.*apptainer.*nor.*singularity"): + with pytest.raises(RuntimeError, match="Neither.*apptainer.*nor.*singularity"): _find_singularity_executable() @@ -73,5 +73,5 @@ class TestEnsureSingularityAvailable: def test_raises_when_not_installed(self): """Raises RuntimeError when neither executable exists.""" with patch("shutil.which", return_value=None): - with pytest.raises(RuntimeError, match="neither.*apptainer.*nor.*singularity"): + with pytest.raises(RuntimeError, match="Neither.*apptainer.*nor.*singularity"): _ensure_singularity_available()