bc1d56d1a4
P0.6: gcov infrastructure P1: extract_structure output expansion (11 new feature fields) P2: Confusion group rule engine (8 pairs + contradiction + backtrack) P3: 4-factor confidence calculation + quality gate update P4: 33+2 COBOL program type test samples (22 files, 7 categories) P5: parametrized/ test data generation engine P6: japanese_data.py lookup tables P7-10: Type-specific test suites (~159 parametrized tests) P11: Full classification pipeline (classify_program) + orchestrator integration P12: Documentation (module-interfaces, test-plan v3.0, coverage-matrix) Architecture decisions: - classification_pipeline/ merged to hina/pipeline/ - parametrized/ as independent module - japanese_data.py as root-level file - hina/__all__ only exports classify_program() Co-Authored-By: Claude <noreply@anthropic.com>
30 lines
773 B
Python
30 lines
773 B
Python
"""RN-01~10: Runners + DataWriter 测试"""
|
|
|
|
import sys, os, json, tempfile
|
|
from pathlib import Path
|
|
from unittest.mock import patch, MagicMock
|
|
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))
|
|
from runners.runner import Runner, BuildResult, RunResult
|
|
|
|
|
|
def test_runner_abstract():
|
|
"""RN-01: 抽象类 → TypeError"""
|
|
import pytest
|
|
with pytest.raises(TypeError):
|
|
Runner()
|
|
|
|
|
|
def test_build_result_defaults():
|
|
"""BuildResult 默认值"""
|
|
r = BuildResult(success=True)
|
|
assert r.success is True
|
|
assert r.artifact_path == ""
|
|
assert r.log == ""
|
|
|
|
|
|
def test_run_result_defaults():
|
|
"""RunResult 默认值"""
|
|
r = RunResult(success=False)
|
|
assert r.success is False
|
|
assert r.records == []
|