|
13 | 13 | import yaml |
14 | 14 |
|
15 | 15 |
|
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.""" |
18 | 18 | package = build_package(tmp_path) |
19 | 19 | db = InMemoryDb() |
20 | 20 | for path, modname in yield_modules(package): |
21 | 21 | for item in analyse_module(path, modname): |
22 | 22 | 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" |
25 | 37 |
|
26 | 38 |
|
27 | 39 | def test_link_validation(tmp_path: Path): |
|
0 commit comments