v1: executing-plans 模式生成,54 文件 1320 行 Python

This commit is contained in:
hangshuo652
2026-05-24 10:02:52 +08:00
commit 06b295f780
55 changed files with 1749 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import sys, os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from comparator.aligner import align_records
def test_align_empty_key_value():
cobol = [{"ID": "", "V": 1}]
java = [{"ID": "", "V": 1}]
result = align_records(cobol, java, key_field="ID")
assert len(result) == 1
def test_align_very_large_key_set():
cobol = [{"ID": f"K{i:04d}", "V": i} for i in range(100)]
java = [{"ID": f"K{i:04d}", "V": i} for i in range(100)]
result = align_records(cobol, java, key_field="ID")
assert len(result) == 100
assert all(s == "MATCHED" for _, _, s in result)