tests template.py: re-ident
authorPaul Brossier <piem@piem.org>
Sat, 1 Dec 2007 14:52:12 +0000 (15:52 +0100)
committerPaul Brossier <piem@piem.org>
Sat, 1 Dec 2007 14:52:12 +0000 (15:52 +0100)
tests/python/template.py

index 29a7173f1862b6f82dd7f0d804939d5a094b0533..c5a3c29a27475ebc779f5020752812cfc0b5778d 100644 (file)
@@ -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))