def test_mazeprops1(self): mc = MazeClause([(("X", (1, 1)), True), (("X", (2, 1)), True), (("Y", (1, 2)), False)]) self.assertTrue(mc.get_prop(("X", (1, 1)))) self.assertTrue(mc.get_prop(("X", (2, 1)))) self.assertFalse(mc.get_prop(("Y", (1, 2)))) self.assertTrue(mc.get_prop(("X", (2, 2))) is None) self.assertFalse(mc.is_empty())
def test_mazeprops4(self): mc = MazeClause([]) self.assertFalse(mc.is_valid()) self.assertTrue(mc.is_empty())
def test_mazeprops2(self): mc = MazeClause([(("X", (1, 1)), True), (("X", (1, 1)), True)]) self.assertTrue(mc.get_prop(("X", (1, 1)))) self.assertFalse(mc.is_empty())