mirror of
https://github.com/usestrix/strix.git
synced 2026-10-04 02:33:47 +00:00
test: reject a leading heading in any finish_scan example field
This commit is contained in:
parent
c0258b25fa
commit
0107a15295
1 changed files with 4 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import re
|
||||
from typing import TYPE_CHECKING, Any, cast
|
||||
|
||||
import pytest
|
||||
|
|
@ -1087,7 +1088,9 @@ def test_tool_descriptions_include_formatting_guidance() -> None:
|
|||
assert "markdown" in finish_desc.lower()
|
||||
assert "section body" in finish_desc.lower()
|
||||
assert "do not start a field with a heading" in finish_desc.lower()
|
||||
assert "\n # Executive Summary" not in finish_desc
|
||||
example = finish_desc.split("Example (abbreviated", 1)[1]
|
||||
heading_lines = [line for line in example.splitlines() if re.match(r"^\s*#{1,6}\s", line)]
|
||||
assert heading_lines == []
|
||||
|
||||
dep_desc = create_dependency_report.description
|
||||
assert "cve" in dep_desc.lower()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue