from review_agent.regulatory_review.services.rule_loader import load_rule_file from review_agent.regulatory_review.services.structure_check import run_structure_check def test_structure_check_reports_missing_instruction_sections(): document_texts = { "说明书.docx": "产品名称:甲胎蛋白检测试剂盒\n样本要求:血清样本\n有效期:12个月" } findings = run_structure_check(document_texts, load_rule_file()) assert any(finding.rule_code == "instructions_for_use:储存条件" for finding in findings) assert all("样本要求" not in finding.title for finding in findings)