Add unit test for python serdes
parent
82d6b8b66b
commit
114f069f23
|
@ -65,6 +65,14 @@ class TestPose3(GtsamTestCase):
|
|||
actual = Pose3.adjoint_(xi, xi)
|
||||
np.testing.assert_array_equal(actual, expected)
|
||||
|
||||
def test_serialization(self):
|
||||
"""Test if serialization is working normally"""
|
||||
expected = Pose3(Rot3.Ypr(0.0, 1.0, 0.0), Point3(1, 1, 0))
|
||||
actual = Pose3()
|
||||
serialized = expected.serialize()
|
||||
actual.deserialize(serialized)
|
||||
self.gtsamAssertEquals(expected, actual, 1e-10)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in New Issue