diff --git a/Tests/pkacalc_test.py b/Tests/pkacalc_test.py index 7eb0bd8..9f006d4 100644 --- a/Tests/pkacalc_test.py +++ b/Tests/pkacalc_test.py @@ -4,6 +4,11 @@ import re from subprocess import call import sys import unittest +import logging + + +ACCEPTABLE_ERROR = 0.001 + # Setting this up as a direct translation of the original runtest.py script # that will be run as part of 'python setup.py test'. This takes on the @@ -53,8 +58,10 @@ class SystemTest(unittest.TestCase): expected_value = float(ref.readline()) value = float(m.group(0)) + value_error = (value-expected_value)/expected_value - if(value != expected_value): + if abs(value_error) > ACCEPTABLE_ERROR: + logging.error(value_error) identity = line[:m.start()].strip() errors.append("%12s %8.2f %8.2f" % (identity, expected_value, value))