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

Method test_loop

python/pymesh/meshutils/tests/test_edge_utils.py:24–36  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

22 self.assert_array_equal([0, 1, 2], chains[0])
23
24 def test_loop(self):
25 E = np.array([
26 [0, 1],
27 [1, 2],
28 [2, 0]
29 ])
30 chains = chain_edges(E)
31 self.assertEqual(1, len(chains))
32
33 chain = chains[0].ravel()
34 start_idx = np.where(chain == 0)[0]
35 chain = np.roll(chain, -start_idx)
36 self.assert_array_equal([0, 1, 2], chain)
37
38 def test_double_chain(self):
39 E = np.array([

Callers

nothing calls this directly

Calls 2

chain_edgesFunction · 0.90
assert_array_equalMethod · 0.80

Tested by

no test coverage detected