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"