diff --git a/test/python_unit/test_case.py b/test/python_unit/test_case.py new file mode 100644 index 0000000000000000000000000000000000000000..e6bec282b6e9af3a6d2c936260764c182c90760c --- /dev/null +++ b/test/python_unit/test_case.py @@ -0,0 +1,7 @@ +import unittest +import numpy as np + +class TestCase(unittest.TestCase): + def assertApprox(self, a, b, epsilon=1e-6): + return self.assertTrue(np.allclose(a, b, epsilon), "%s !~= %s" % (a, b)) +