pose_format.numpy.representation.distance_test module

Classes:

TestDistanceRepresentation([methodName])

Unit tests for DistanceRepresentation class to computes Euclidean distance between sets of 3D points.

class pose_format.numpy.representation.distance_test.TestDistanceRepresentation(methodName='runTest')[source]

Bases: TestCase

Unit tests for DistanceRepresentation class to computes Euclidean distance between sets of 3D points.

Methods:

test_call_masked_value_should_be_zero()

Test if the distance for masked values is zero.

test_call_value_should_be_distance()

Test if computed distance between two points is correct.

test_call_masked_value_should_be_zero()[source]

Test if the distance for masked values is zero.

Note

This test checks scenario where one set of points is masked.The computed distance in such in such a case be 0.

test_call_value_should_be_distance()[source]

Test if computed distance between two points is correct.

Note

This test initializes two sets of 3D points: p1 = (1, 2, 3) and p2 = (4, 5, 6). It then checks if the computed Euclidean distance between p1 and p2 is sqrt(27).