Esempio n. 1
0
    def testPartOne(self):
        firstExpected = 436
        firstData = [0, 3, 6]

        secondExpected = 1
        secondData = [1, 3, 2]

        thirdExpected = 10
        thirdData = [2, 1, 3]

        fourthExpected = 27
        fourthData = [1, 2, 3]

        fifthExpected = 78
        fifthData = [2, 3, 1]

        sixthExpected = 438
        sixthData = [3, 2, 1]

        seventhExpected = 1836
        seventhData = [3, 1, 2]

        self.assertEqual(partOne(firstData), firstExpected)
        self.assertEqual(partOne(secondData), secondExpected)
        self.assertEqual(partOne(thirdData), thirdExpected)
        self.assertEqual(partOne(fourthData), fourthExpected)
        self.assertEqual(partOne(fifthData), fifthExpected)
        self.assertEqual(partOne(sixthData), sixthExpected)
        self.assertEqual(partOne(seventhData), seventhExpected)
Esempio n. 2
0
 def testPartOne(self):
     expected = 14897079
     result = partOne(self.data)
     self.assertEqual(result, expected)
Esempio n. 3
0
 def testPartOne(self):
     expected = 7
     foundTrees = partOne(self.data)
     self.assertEqual(foundTrees, expected)
Esempio n. 4
0
 def testPartOne(self):
     expectedAcc = 5
     acc = partOne(self.data)
     self.assertEqual(acc, expectedAcc)
Esempio n. 5
0
 def testPartOne(self):
     expected = 25
     actions = ['F10', 'N3', 'F7', 'R90', 'F11']
     result = partOne(actions)
     self.assertEqual(result, expected)
Esempio n. 6
0
 def testPartOne(self):
     expected = 37
     result = partOne(self.initialState)
     self.assertEqual(result, expected)
Esempio n. 7
0
 def testPartOne(self):
     expected = 2
     matches = partOne(self.data)
     self.assertEqual(matches, expected)
Esempio n. 8
0
 def testPartOne(self):
     expected = 26386
     result = partOne(self.data)
     self.assertEqual(result, expected)
Esempio n. 9
0
 def testPartOne(self):
     expected = '67384529'
     result = partOne(self.data)
     self.assertEqual(result, expected)
Esempio n. 10
0
 def testPartOne(self):
     expected = 20899048083289
     result = partOne(self.data)
     self.assertEqual(result, expected)
Esempio n. 11
0
 def testPartOne(self):
     expected = '1721 * 299 = 514579'
     self.assertEqual(partOne(self.data), expected)
Esempio n. 12
0
 def testPartOne(self):
     expected = 2
     result = partOne(self.data, self.keyRules)
     self.assertEqual(result, expected)