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

Method test_generic_table_simple

ar_test.py:76–86  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

74 self.assertEqual(links, [(1, 2), (3, 4), (5, 6), (2, 3)])
75
76 def test_generic_table_simple(self):
77 tb = ar.Table()
78
79 # If a-b = b-c & d-a = c-d
80 tb.add_eq4('a', 'b', 'b', 'c', 'fact1')
81 tb.add_eq4('d', 'a', 'c', 'd', 'fact2')
82 tb.add_eq4('x', 'y', 'z', 't', 'fact3') # distractor fact
83
84 # Then b=d, because {fact1, fact2} but not fact3.
85 result = list(tb.get_all_eqs_and_why())
86 self.assertIn(('b', 'd', ['fact1', 'fact2']), result)
87
88 def test_angle_table_inbisector_exbisector(self):
89 """Test that AR can figure out bisector & ex-bisector are perpendicular."""

Callers

nothing calls this directly

Calls 2

add_eq4Method · 0.95
get_all_eqs_and_whyMethod · 0.95

Tested by

no test coverage detected