Skip to content

Commit

Permalink
tests: add README example to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
schlegelp committed Aug 28, 2024
1 parent 23427d5 commit 7e3179e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_skeletor.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,17 @@ def test_radius(self):

rad_knn = sk.post.radii(s, method='knn')
rad_ray = sk.post.radii(s, method='ray')


class TestExamples:
def test_readme_example(self):
mesh = sk.example_mesh()
fixed = sk.pre.fix_mesh(mesh, remove_disconnected=5, inplace=False)
skel = sk.skeletonize.by_wavefront(fixed, waves=1, step_size=1)

assert isinstance(skel.vertices, np.ndarray)
assert isinstance(skel.edges, np.ndarray)
assert isinstance(skel.mesh_map, np.ndarray)
assert skel.vertices.shape[1] == 3
assert skel.edges.shape[1] == 2
assert skel.mesh_map.shape[0] == len(skel.vertices)

0 comments on commit 7e3179e

Please sign in to comment.