@@ -186,7 +186,7 @@ def test_to_mask(self):
186186
187187
188188class TestTriangularMeshes :
189- def test_init (self ):
189+ def test_api (self ):
190190# Tetrahedron
191191coords = np .array (
192192 [
@@ -227,6 +227,36 @@ def test_init(self):
227227assert tm2 .n_triangles == 4
228228assert tm3 .n_triangles == 4
229229
230+ out_coords ,out_tris = tm1 .get_mesh ()
231+ # Currently these are the exact arrays, but I don't think we should
232+ # bake that assumption into the tests
233+ assert np .allclose (out_coords ,coords )
234+ assert np .allclose (out_tris ,triangles )
235+
236+
237+ class TestCoordinateFamilyMixin (TestPointsets ):
238+ def test_names (self ):
239+ coords = np .array (
240+ [
241+ [0.0 ,0.0 ,0.0 ],
242+ [0.0 ,0.0 ,1.0 ],
243+ [0.0 ,1.0 ,0.0 ],
244+ [1.0 ,0.0 ,0.0 ],
245+ ]
246+ )
247+ cfm = ps .CoordinateFamilyMixin (coords )
248+
249+ assert cfm .get_names ()== ['original' ]
250+ assert np .allclose (cfm .with_name ('original' ).coordinates ,coords )
251+
252+ cfm .add_coordinates ('shifted' ,coords + 1 )
253+ assert cfm .get_names ()== ['original' ,'shifted' ]
254+ shifted = cfm .with_name ('shifted' )
255+ assert np .allclose (shifted .coordinates ,coords + 1 )
256+ assert shifted .get_names ()== ['original' ,'shifted' ]
257+ original = shifted .with_name ('original' )
258+ assert np .allclose (original .coordinates ,coords )
259+
230260
231261class H5ArrayProxy :
232262def __init__ (self ,file_like ,dataset_name ):