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
+23
View File
@@ -0,0 +1,23 @@
import sys, os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))
from comparator.field_compare import compare_field
def test_negative_numbers():
r = compare_field("AMT", "-1500", "-1500", "decimal")
assert r.status == "PASS"
def test_mixed_precision():
r = compare_field("AMT", "1500.00", "1500", "decimal", tolerance=0.01)
assert r.status == "PASS"
def test_non_numeric_in_numeric_field():
r = compare_field("AMT", "ABC", "1500", "decimal")
assert r.status in ("MISMATCH", "NOT_SET")
def test_very_large_number():
r = compare_field("AMT", "9999999999", "9999999999", "decimal")
assert r.status == "PASS"