Commit 2404e18e authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

Fix Python unit test.

parent e5cab93a
......@@ -157,11 +157,21 @@ class TestGeometricShapes(TestCase):
convex = hppfcl.Convex(verts, faces)
verts.append (np.array([0, 0, 1]))
convexHull = hppfcl.Convex.convexHull(verts, False, None)
convexHull = hppfcl.Convex.convexHull(verts, False, "")
try:
convexHull = hppfcl.Convex.convexHull(verts, False, None)
qhullAvailable = True
except Exception as e:
self.assertEqual(str(e), "Library built without qhull. Cannot build object of this type.")
qhullAvailable = False
convexHull = hppfcl.Convex.convexHull(verts, True, "")
if qhullAvailable:
convexHull = hppfcl.Convex.convexHull(verts, False, "")
convexHull = hppfcl.Convex.convexHull(verts, True, "")
try:
convexHull = hppfcl.Convex.convexHull(verts[:3], False, None)
except Exception as e:
self.assertIn(str(e), "You shouldn't use this function with less than 4 points.")
if __name__ == '__main__':
unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment