def test_other_type_returns_none_if_type_not_other(self):
     test_joint = self.create_joint()
     test_joint.attr('type').set(skeletonutils.LABEL_INT_KNEE)
     test_joint.otherType.set('foo')
     expected = (0, skeletonutils.LABEL_INT_KNEE, None)
     result = skeletonutils.get_joint_label(test_joint)
     self.assertTupleEqual(expected, result)
 def test_other_type(self):
     test_joint = self.create_joint()
     test_joint.attr('type').set(skeletonutils.LABEL_INT_OTHER)
     test_joint.otherType.set('foo')
     expected = (0, skeletonutils.LABEL_INT_OTHER, 'foo')
     result = skeletonutils.get_joint_label(test_joint)
     self.assertTupleEqual(expected, result)
 def test_default_joint(self):
     test_joint = self.create_joint()
     result = skeletonutils.get_joint_label(test_joint)
     self.assertTupleEqual((0, 0, None), result)
 def assert_label_type(label_type, expected=None):
     test_joint.attr('type').set(label_type)
     expected = expected or (0, label_type, None)
     result = skeletonutils.get_joint_label(test_joint)
     self.assertTupleEqual(expected, result)
 def assert_side(side):
     test_joint.side.set(side)
     expected = (side, 0, None)
     result = skeletonutils.get_joint_label(test_joint)
     self.assertTupleEqual(expected, result)