def test_getHalfExtentsWithoutMargin(self): """ L{CylinderShape.getHalfExtentsWithoutMargin} returns the cylinder's half extents vector. """ halfExtents = Vector3(2, 5, 7) shape = CylinderShape(halfExtents) result = shape.getHalfExtentsWithoutMargin() self.assertEqual(result.x, 1.9600000381469727) self.assertEqual(result.y, 4.9600000381469727) self.assertEqual(result.z, 6.9600000381469727)
def test_radius(self): """ L{CylinderShape.getRadius} returns the radius of the cylinder. """ shape = CylinderShape(Vector3(1, 2, 3)) self.assertEqual(shape.getRadius(), 1)
def test_instantiate(self): shape = CylinderShape(Vector3(1, 2, 3)) self.assertTrue(isinstance(shape, CylinderShape))