X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=baro_tests%2Ftests.py;h=580ee4d2891ed64a9edc449394a3a2fef9cf2e9a;hb=eda0dc0173f6f27aa393f05a9ee3365c3e58e021;hp=4cbd0e87895f927b9a61012f18925c18e4a982fe;hpb=151a5d6db45763a4c130a37d69f120704fac8039;p=barometer.git diff --git a/baro_tests/tests.py b/baro_tests/tests.py index 4cbd0e87..580ee4d2 100644 --- a/baro_tests/tests.py +++ b/baro_tests/tests.py @@ -15,6 +15,7 @@ """Function for testing collectd plug-ins with different oup plug-ins""" import time +import math def test_snmp_sends_data( @@ -223,7 +224,7 @@ def test_csv_handles_plugin_data( + 'to interval...') for metric in plugin_metrics: logger.debug('{0} {1} {2} ... '.format(metric[0], metric[1], metric[2])) - if metric[3] - metric[2] != interval: + if math.floor(metric[3] - metric[2]) > interval: logger.error( 'Time of last two entries differ by ' + '{}, but interval is {}'.format(