MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / assert_valid_attributes

Method assert_valid_attributes

python/pymesh/tests/test_outerhull.py:13–23  ·  view source on GitHub ↗
(self, mesh, outer_hull)

Source from the content-addressed store, hash-verified

11
12class OuterHullTest(TestCase):
13 def assert_valid_attributes(self, mesh, outer_hull):
14 self.assertTrue(outer_hull.has_attribute("flipped"))
15 self.assertTrue(outer_hull.has_attribute("face_sources"))
16
17 flipped = outer_hull.get_attribute("flipped")
18 face_sources = outer_hull.get_attribute("face_sources")
19
20 self.assertEqual(outer_hull.num_faces, len(flipped))
21 self.assertEqual(outer_hull.num_faces, len(face_sources))
22 self.assertTrue(np.all(face_sources >= 0))
23 self.assertTrue(np.all(face_sources < mesh.num_faces))
24
25 def test_simple_cube(self):
26 mesh = generate_box_mesh(

Callers 5

test_simple_cubeMethod · 0.95
test_nested_cubesMethod · 0.95
test_face_face_touchMethod · 0.95

Calls 2

has_attributeMethod · 0.45
get_attributeMethod · 0.45

Tested by

no test coverage detected