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

Class AlphaGeometryTest

alphageometry_test.py:24–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23
24class AlphaGeometryTest(unittest.TestCase):
25
26 def test_translate_constrained_to_constructive(self):
27 self.assertEqual(
28 alphageometry.translate_constrained_to_constructive(
29 'd', 'T', list('addb')
30 ),
31 ('on_dia', ['d', 'b', 'a']),
32 )
33 self.assertEqual(
34 alphageometry.translate_constrained_to_constructive(
35 'd', 'T', list('adbc')
36 ),
37 ('on_tline', ['d', 'a', 'b', 'c']),
38 )
39 self.assertEqual(
40 alphageometry.translate_constrained_to_constructive(
41 'd', 'P', list('bcda')
42 ),
43 ('on_pline', ['d', 'a', 'b', 'c']),
44 )
45 self.assertEqual(
46 alphageometry.translate_constrained_to_constructive(
47 'd', 'D', list('bdcd')
48 ),
49 ('on_bline', ['d', 'c', 'b']),
50 )
51 self.assertEqual(
52 alphageometry.translate_constrained_to_constructive(
53 'd', 'D', list('bdcb')
54 ),
55 ('on_circle', ['d', 'b', 'c']),
56 )
57 self.assertEqual(
58 alphageometry.translate_constrained_to_constructive(
59 'd', 'D', list('bacd')
60 ),
61 ('eqdistance', ['d', 'c', 'b', 'a']),
62 )
63 self.assertEqual(
64 alphageometry.translate_constrained_to_constructive(
65 'd', 'C', list('bad')
66 ),
67 ('on_line', ['d', 'b', 'a']),
68 )
69 self.assertEqual(
70 alphageometry.translate_constrained_to_constructive(
71 'd', 'C', list('bad')
72 ),
73 ('on_line', ['d', 'b', 'a']),
74 )
75 self.assertEqual(
76 alphageometry.translate_constrained_to_constructive(
77 'd', 'O', list('abcd')
78 ),
79 ('on_circum', ['d', 'a', 'b', 'c']),
80 )
81

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected