2 GTSAM Copyright 2010-2019, Georgia Tech Research Corporation,
3 Atlanta, Georgia 30332-0415
6 See LICENSE for the license information
8 TestCase class with GTSAM assert utils.
16 """TestCase class with GTSAM assert utils."""
19 """ AssertEqual function that prints out actual and expected if not equal.
21 self.gtsamAssertEqual(actual,expected)
23 tol {float} -- tolerance passed to 'equals', default 1e-9
27 equal = numpy.allclose(actual, expected, atol=tol)
29 equal = actual.equals(expected, tol)
31 raise self.failureException(
32 "Values are not equal:\n{}!={}".
format(actual, expected))
35 """ Performs a round-trip using pickle and asserts equality.
38 self.assertEqualityOnPickleRoundtrip(obj)
40 tol {float} -- tolerance passed to 'equals', default 1e-9
42 roundTripObj = pickle.loads(pickle.dumps(obj))