Skip to content

Commit 03dda1c

Browse files
committed
tests: remove full topmatter test
1 parent edbd2da commit 03dda1c

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

quartodoc/tests/test_builder.py

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -225,52 +225,3 @@ def test_builder_index_topmatter_fallback(tmp_path):
225225

226226
index = (Path(tmp_path) / "index.qmd").read_text()
227227
assert "title: Function Reference" in index
228-
229-
230-
def test_builder_index_topmatter_full_build(tmp_path):
231-
"""Test full build with index-topmatter configuration."""
232-
cfg = yaml.safe_load(
233-
"""
234-
quartodoc:
235-
package: quartodoc.tests.example
236-
index-topmatter:
237-
title: "Complete API Reference"
238-
description: "Full documentation with custom frontmatter"
239-
author: "Test Suite"
240-
date-modified: "2024-12-04"
241-
toc: true
242-
toc-depth: 2
243-
sections:
244-
- title: Test Functions
245-
desc: "Testing the new index-topmatter feature"
246-
contents:
247-
- a_func
248-
- AClass
249-
"""
250-
)
251-
252-
builder = Builder.from_quarto_config(cfg)
253-
builder.dir = str(tmp_path / "api")
254-
255-
# Run the full build
256-
builder.build()
257-
258-
# Check that the index file was created with correct frontmatter
259-
index_path = Path(tmp_path) / "api" / "index.qmd"
260-
assert index_path.exists()
261-
262-
index_content = index_path.read_text()
263-
assert "title: Complete API Reference" in index_content
264-
assert "description: Full documentation with custom frontmatter" in index_content
265-
assert "author: Test Suite" in index_content
266-
assert "date-modified: '2024-12-04'" in index_content or "date-modified: 2024-12-04" in index_content
267-
assert "toc: true" in index_content
268-
assert "toc-depth: 2" in index_content
269-
270-
# Check that the section title is still rendered correctly
271-
assert "## Test Functions" in index_content
272-
assert "Testing the new index-topmatter feature" in index_content
273-
274-
# Check that individual pages were created
275-
assert (Path(tmp_path) / "api" / "a_func.qmd").exists()
276-
assert (Path(tmp_path) / "api" / "AClass.qmd").exists()

0 commit comments

Comments
 (0)