File size: 951 Bytes
9deb9bb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import pytest
import json
from pathlib import Path

SCHEMA_PATH = Path("../schemas/model_registry.schema.json")

def test_schema_valid():
    """Test that schema is valid JSON"""
    schema = json.loads(SCHEMA_PATH.read_text())
    assert schema["$schema"] == "http://json-schema.org/draft-07/schema#"
    assert "properties" in schema

def test_eval_reports_exist():
    """Test that all eval reports exist"""
    eval_path = Path("../evaluation_reports")
    reports = list(eval_path.glob("*.md"))
    assert len(reports) >= 3, "Expected at least 3 eval reports"

def test_eval_report_content():
    """Test eval report structure"""
    reports = Path("../evaluation_reports").glob("*.md")
    for report in reports:
        content = report.read_text()
        assert "## Model" in content
        assert "## Evaluation Results" in content
        assert "## Recommendation" in content

if __name__ == "__main__":
    pytest.main([__file__, "-v"])