Skip to content
Snippets Groups Projects
Commit 48483d6b authored by Gabriele Buondonno's avatar Gabriele Buondonno
Browse files

[unit] Improve PinocchioTestCase

parent f703277a
Branches
Tags
No related merge requests found
......@@ -9,5 +9,6 @@ def tracefunc(frame, event, arg):
return tracefunc
class PinocchioTestCase(unittest.TestCase):
def assertApprox(self, a, b):
return self.assertTrue(isapprox(a, b))
def assertApprox(self, a, b, eps=1e-6):
return self.assertTrue(isapprox(a, b, eps),
"\n%s\nis not approximately equal to\n%s\nwith precision %f" % (a, b, eps))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment