From b71b2847afde57615ed535e46015a665af838825 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 19 May 2026 08:00:48 +0200 Subject: [PATCH] test_lazy_tool: pick a non-MATERIALIZE_OK attr for strict-raise test ``tool_action`` graduated to ``_MATERIALIZE_OK`` in the previous commit (it's read on the execute path). The strict-raise assertion needs an attribute the stub neither forwards nor materialises; ``totally_not_a_tool_attr`` is guaranteed unaccounted-for. --- test/unit/app/tools/test_lazy_tool.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/unit/app/tools/test_lazy_tool.py b/test/unit/app/tools/test_lazy_tool.py index 82303a132e7..03e74ece3cf 100644 --- a/test/unit/app/tools/test_lazy_tool.py +++ b/test/unit/app/tools/test_lazy_tool.py @@ -167,9 +167,13 @@ def test_allow_user_access_allows_admin_for_data_manager(): def test_strict_getattr_raises_with_clear_message(): t = _stub() + # Pick an attribute that is *not* on the forwarded surface and not in + # ``_MATERIALIZE_OK`` so the strict path fires. (``tool_action`` used to + # live here but is now a materialise-OK attr; ``totally_not_a_tool_attr`` + # is guaranteed unaccounted-for.) with pytest.raises(NotImplementedError) as ei: - _ = t.tool_action - assert "tool_action" in str(ei.value) + _ = t.totally_not_a_tool_attr + assert "totally_not_a_tool_attr" in str(ei.value) assert "bowtie2" in str(ei.value)