This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new ac824e59cd6 Fix the common.ai Toolsets table test failing on main 
(#77894)
ac824e59cd6 is described below

commit ac824e59cd625c8c9b7294f45431e006300daa1f
Author: David Blain <[email protected]>
AuthorDate: Tue Dec 1 16:06:54 2026 +0100

    Fix the common.ai Toolsets table test failing on main (#77894)
    
    The sandbox backends in the "External services" column became :doc: links,
    which the test counted as toolsets without an entry. Only the target that
    opens a row names a toolset, so only that one is compared.
---
 .../common/ai/tests/unit/common/ai/test_provider_metadata.py  | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/providers/common/ai/tests/unit/common/ai/test_provider_metadata.py 
b/providers/common/ai/tests/unit/common/ai/test_provider_metadata.py
index f630485f8c4..372b292eaf1 100644
--- a/providers/common/ai/tests/unit/common/ai/test_provider_metadata.py
+++ b/providers/common/ai/tests/unit/common/ai/test_provider_metadata.py
@@ -536,19 +536,20 @@ class TestToolsetExternalServices:
     def test_toolset_table_entries_match_supported_services_rst(self):
         """
         Guard `supported_services.rst`'s hand-written Toolsets table against 
drifting from
-        `TOOLSET_TABLE_ENTRIES`, in both directions: every entry's `:doc:` 
target must appear in
-        the Toolsets section, and no *other* `:doc:` target may appear there 
either.
+        `TOOLSET_TABLE_ENTRIES`, in both directions: every entry's `:doc:` 
target must open a
+        row of the table, and no row may open with any *other* `:doc:` target. 
Only the first
+        column names a toolset: the "External services" column is free to link 
to other pages.
         """
         rst_text = (PROVIDER_YAML_PATH.parent / "docs" / 
"supported_services.rst").read_text()
         start = rst_text.index("Toolsets\n--------")
         end = rst_text.index("Notes\n-----", start)
         toolsets_section = rst_text[start:end]
 
-        rendered_targets = set(re.findall(r":doc:`[^<]*<([^>]+)>`", 
toolsets_section))
+        row_targets = set(re.findall(r"^\s*\* - :doc:`[^<]*<([^>]+)>`", 
toolsets_section, re.MULTILINE))
         expected_targets = {doc_target for _, doc_target in 
TOOLSET_TABLE_ENTRIES.values()}
 
-        assert rendered_targets == expected_targets, (
-            f"supported_services.rst's Toolsets section links to 
{sorted(rendered_targets)}, "
+        assert row_targets == expected_targets, (
+            f"supported_services.rst's Toolsets table has rows for 
{sorted(row_targets)}, "
             f"expected {sorted(expected_targets)}"
         )
 

Reply via email to