MCPcopy Create free account
hub / github.com/google-deepmind/alphageometry / test_cross

Method test_cross

graph_utils_test.py:25–34  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

23class GraphUtilsTest(unittest.TestCase):
24
25 def test_cross(self):
26 self.assertEqual(gu.cross([], [1]), [])
27 self.assertEqual(gu.cross([1], []), [])
28 self.assertEqual(gu.cross([1], [2]), [(1, 2)])
29 self.assertEqual(gu.cross([1], [2, 3]), [(1, 2), (1, 3)])
30
31 e1 = [1, 2, 3]
32 e2 = [4, 5]
33 target = [(1, 4), (1, 5), (2, 4), (2, 5), (3, 4), (3, 5)]
34 self.assertEqual(gu.cross(e1, e2), target)
35
36 def test_comb2(self):
37 self.assertEqual(gu.comb2([]), [])

Callers

nothing calls this directly

Calls 1

crossMethod · 0.80

Tested by

no test coverage detected