def testSmartness4(self): hobo = Hobo() hobo.runningResults = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0]] hobo.runningL0 = [15, 20] hobo.runningL1 = [10, 5] hobo.info = [[0, 0], []] hobo.act(4) self.assertEqual([0, 1], hobo.positionHistory)
def testGuaranteedSafe(self): hobo = Hobo() hobo.runningResults = [[0, 0]] hobo.runningL0 = [1000] hobo.runningL1 = [5] value = hobo.doMaths() answer = [100] self.assertEqual(answer, value)
def testSmartness3(self): hobo = Hobo() hobo.info = [[1, 1], []] hobo.runningResults = [[1, 1, 1, 1, 1], [0, 0]] hobo.runningL0 = [8, 10] hobo.runningL1 = [5, 3] hobo.act(3) self.assertEqual([0, 1], hobo.positionHistory)
def testNormal(self): hobo = Hobo() hobo.runningResults = [[0, 0], [1, 1]] hobo.runningL0 = [3, 4] hobo.runningL1 = [4, 5] value = hobo.doMaths() answer = [46, 66] self.assertEqual(answer, value)