def test_basic(self): def test(amb): x = amb() if not x: raise Fail return x ar = Runner(test) result = ar.run() self.assertEqual(result, True)
def test_args(self): def test(amb, k): x = amb() if not x: raise Fail return k ar = Runner(test) result = ar.run(123) self.assertEqual(result, 123)
def test_eight(self): ar = Runner(eight_queens) result = ar.run() self.assertEqual(result, [[0, 0], [1, 4], [2, 7], [3, 5], [4, 2], [5, 6], [6, 1], [7, 3]])
def test_eight(self): ar = Runner(eight_queens) result = ar.run() self.assertEqual( result, [[0, 0], [1, 4], [2, 7], [3, 5], [4, 2], [5, 6], [6, 1], [7, 3]])