Skip to content

Commit b5d38b6

Browse files
committed
removed snapshot testing
1 parent 7cc53e4 commit b5d38b6

File tree

3 files changed

+16
-107
lines changed

3 files changed

+16
-107
lines changed

tests/test_render.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,27 @@
1313
import yaml
1414

1515

16-
def test_basic(tmp_path: Path, file_regression):
17-
"""Test basic rendering - minimal snapshot test for regression detection."""
16+
def test_basic_rendering_functional(tmp_path: Path):
17+
"""Test basic rendering works without crashes - functional test, no snapshots."""
1818
package = build_package(tmp_path)
1919
db = InMemoryDb()
2020
for path, modname in yield_modules(package):
2121
for item in analyse_module(path, modname):
2222
db.add(item)
23-
content = "\n".join(FernRenderer(db, Config()).render_item(package.name))
24-
file_regression.check(content, extension=".mdx")
23+
24+
renderer = FernRenderer(db, Config())
25+
content = "\n".join(renderer.render_item(package.name))
26+
27+
# Functional assertions - test that it works, not exact format
28+
assert content.startswith("---\n"), "Should have frontmatter"
29+
assert "layout: overview" in content, "Should have layout"
30+
assert "slug: package" in content, "Should have correct slug"
31+
assert "## Module Contents" in content, "Should have module contents section"
32+
assert "```python" in content, "Should have code blocks"
33+
assert "This is a test package." in content, "Should include docstrings"
34+
35+
# Test that tables exist without caring about exact format
36+
assert "Classes" in content or "Functions" in content, "Should have summary tables"
2537

2638

2739
def test_link_validation(tmp_path: Path):

tests/test_render/test_basic.mdx

Lines changed: 0 additions & 95 deletions
This file was deleted.

tests/test_render/test_config_options.mdx

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)