From: Paul Brossier Date: Sat, 1 Dec 2007 14:52:12 +0000 (+0100) Subject: tests template.py: re-ident X-Git-Tag: bzr2git~423 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8987df1a1291eb31e83dc78d877de211db145320;p=aubio.git tests template.py: re-ident --- diff --git a/tests/python/template.py b/tests/python/template.py index 29a7173f..c5a3c29a 100644 --- a/tests/python/template.py +++ b/tests/python/template.py @@ -4,15 +4,15 @@ import unittest class aubio_unit_template(unittest.TestCase): def assertCloseEnough(self, first, second, places=5, msg=None): - """Fail if the two objects are unequal as determined by their - *relative* difference rounded to the given number of decimal places - (default 7) and comparing to zero. - """ - if round(first, places) == 0: - if round(second-first, places) != 0: - raise self.failureException, \ - (msg or '%r != %r within %r places' % (first, second, places)) - else: - if round((second-first)/first, places) != 0: - raise self.failureException, \ - (msg or '%r != %r within %r places' % (first, second, places)) + """Fail if the two objects are unequal as determined by their + *relative* difference rounded to the given number of decimal places + (default 7) and comparing to zero. + """ + if round(first, places) == 0: + if round(second-first, places) != 0: + raise self.failureException, \ + (msg or '%r != %r within %r places' % (first, second, places)) + else: + if round((second-first)/first, places) != 0: + raise self.failureException, \ + (msg or '%r != %r within %r places' % (first, second, places))