Skip to content

Commit 4f53102

Browse files
authored
Merge pull request #524 from computerlovetech/fix/stale-docs-tests
test: retarget docs tests to the new consolidated docs structure
2 parents 5b49b18 + e0a86ac commit 4f53102

1 file changed

Lines changed: 9 additions & 55 deletions

File tree

tests/test_docs.py

Lines changed: 9 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,14 @@ def test_index_exists(self):
4444
"""Home page exists."""
4545
assert (DOCS_DIR / "index.md").exists()
4646

47-
def test_creating_exists(self):
48-
"""Creating skills page exists."""
49-
assert (DOCS_DIR / "creating.md").exists()
47+
def test_managing_exists(self):
48+
"""Managing skills page exists."""
49+
assert (DOCS_DIR / "managing.md").exists()
5050

5151
def test_reference_exists(self):
5252
"""Reference page exists."""
5353
assert (DOCS_DIR / "reference.md").exists()
5454

55-
def test_llms_txt_exists(self):
56-
"""llms.txt exists."""
57-
assert (DOCS_DIR / "llms.txt").exists()
58-
5955

6056
class TestInternalLinks:
6157
"""Test that internal links resolve to existing files."""
@@ -189,33 +185,17 @@ class TestToolDocumentation:
189185

190186
ALL_TOOL_NAMES = set(TOOLS.keys())
191187

192-
def test_configuration_mentions_all_tools(self):
193-
"""configuration.md tools table lists all supported tools."""
194-
content = (DOCS_DIR / "configuration.md").read_text()
195-
# Check the Multi-Tool Setup section which has the tools table.
196-
section_marker = "## Multi-Tool Setup"
188+
def test_managing_mentions_all_tools(self):
189+
"""managing.md Multi-tool section lists all supported tools."""
190+
content = (DOCS_DIR / "managing.md").read_text()
191+
section_marker = "## Multi-tool"
197192
assert section_marker in content, (
198-
"configuration.md missing 'Multi-Tool Setup' section"
193+
"managing.md missing 'Multi-tool' section"
199194
)
200195
section = content[content.index(section_marker) :]
201196
for tool in self.ALL_TOOL_NAMES:
202197
assert tool in section.lower(), (
203-
f"Tool '{tool}' not in configuration.md Multi-Tool Setup section"
204-
)
205-
206-
def test_agrx_cli_table_mentions_all_tools(self):
207-
"""agrx.md CLI Requirements table lists all supported tools."""
208-
content = (DOCS_DIR / "agrx.md").read_text()
209-
# Extract just the CLI Requirements section to ensure tools appear
210-
# in the table, not just in passing mentions elsewhere on the page.
211-
cli_section_marker = "## Tool CLI Requirements"
212-
assert cli_section_marker in content, (
213-
"agrx.md missing 'Tool CLI Requirements' section"
214-
)
215-
cli_section = content[content.index(cli_section_marker) :]
216-
for tool in self.ALL_TOOL_NAMES:
217-
assert tool in cli_section.lower(), (
218-
f"Tool '{tool}' not in agrx.md CLI Requirements table"
198+
f"Tool '{tool}' not in managing.md Multi-tool section"
219199
)
220200

221201
def test_reference_agrx_section_mentions_all_tools(self):
@@ -226,25 +206,6 @@ def test_reference_agrx_section_mentions_all_tools(self):
226206
f"Tool '{tool}' not mentioned in reference.md"
227207
)
228208

229-
def test_tools_page_detection_signals_match_code(self):
230-
"""tools.md Detection Signals table matches ToolConfig.detection_signals."""
231-
content = (DOCS_DIR / "tools.md").read_text()
232-
section_marker = "## Detection Signals"
233-
assert section_marker in content, "tools.md missing 'Detection Signals' section"
234-
section = content[content.index(section_marker) :]
235-
# Stop at the next h2 section
236-
next_h2 = section.find("\n## ", 1)
237-
if next_h2 != -1:
238-
section = section[:next_h2]
239-
240-
for name, tool in self.TOOLS.items():
241-
for signal in tool.detection_signals:
242-
assert signal in section, (
243-
f"Detection signal '{signal}' for tool '{name}' "
244-
f"missing from tools.md Detection Signals table"
245-
)
246-
247-
248209
class TestContentQuality:
249210
"""Test documentation content quality."""
250211

@@ -253,13 +214,6 @@ def test_index_has_quick_start(self):
253214
content = (DOCS_DIR / "index.md").read_text()
254215
assert "uvx agr add" in content or "uv tool install agr" in content
255216

256-
def test_creating_has_skill_example(self):
257-
"""Creating page has a complete skill example."""
258-
content = (DOCS_DIR / "creating.md").read_text()
259-
assert "SKILL.md" in content
260-
assert "name:" in content
261-
assert "description:" in content
262-
263217
def test_reference_has_all_commands(self):
264218
"""Reference page documents all main commands."""
265219
content = (DOCS_DIR / "reference.md").read_text()

0 commit comments

Comments
 (0)