chore: Phase3 Word 解析收尾(尾随换行/import 排序/契约注释)
This commit is contained in:
@@ -3,9 +3,9 @@ from pathlib import Path
|
||||
import pytest
|
||||
|
||||
from genesis.parsers.excel_parser import ExcelParser
|
||||
from genesis.parsers.word_template_parser import WordTemplateParser
|
||||
from genesis.parsers.rule_doc_parser import RuleDocParser
|
||||
from genesis.parsers.source_aggregator import SourceParser
|
||||
from genesis.parsers.word_template_parser import WordTemplateParser
|
||||
|
||||
SAMPLES = Path(__file__).resolve().parents[1] / "samples"
|
||||
|
||||
@@ -120,4 +120,4 @@ def test_source_parser_full_sample_assembly():
|
||||
assert result.tables
|
||||
assert result.template is not None
|
||||
assert len(result.rule_docs) == 2
|
||||
assert all(r.category == "write" for r in result.rule_docs)
|
||||
assert all(r.category == "write" for r in result.rule_docs)
|
||||
|
||||
@@ -95,4 +95,4 @@ def test_parse_extensionless_rule(tmp_path):
|
||||
bad = tmp_path / "note"
|
||||
bad.write_text("hello", encoding="utf-8")
|
||||
with pytest.raises(ValueError, match="无扩展名"):
|
||||
SourceParser().parse(rule_paths=[bad])
|
||||
SourceParser().parse(rule_paths=[bad])
|
||||
|
||||
Reference in New Issue
Block a user