Exemplo n.º 1
0
 def test_calcSeatID(self):
     pass1 = Day5.findSeatRowCol(self.boardingPass1)
     self.assertEqual(Day5.calcSeatID(pass1), 567)
     pass2 = Day5.findSeatRowCol(self.boardingPass2)
     self.assertEqual(Day5.calcSeatID(pass2), 119)
     pass3 = Day5.findSeatRowCol(self.boardingPass3)
     self.assertEqual(Day5.calcSeatID(pass3), 820)
     pass4 = Day5.findSeatRowCol(self.boardingPass4)
     self.assertEqual(Day5.calcSeatID(pass4), 357)
def main():
    Day0.run()
    Day1.run()
    Day2.run()
    Day3.run()
    Day4.run()
    Day5.run()
    Day6.run()
    Day7.run()
    Day8.run()
    Day9.run()
    Day10.run()
    Day11.run()
    Day12.run()
    Day13.run()
    Day14.run()
    Day15.run()
    Day16.run()
    Day17.run()
    Day18.run()
    Day19.run()
Exemplo n.º 3
0
 def test_part_1_case_1(self):
     self.assertTrue(Day5.part_1_is_nice_string("ugknbfddgicrmopn"))
Exemplo n.º 4
0
 def test_part_2_case_3(self):
     self.assertFalse(Day5.part_2_is_nice_string("uurcxstgmygtbstg"))
Exemplo n.º 5
0
 def test_part_2_case_4(self):
     self.assertFalse(Day5.part_2_is_nice_string("ieodomkazucvgmuy"))
Exemplo n.º 6
0
 def test_part_2_case_1(self):
     self.assertTrue(Day5.part_2_is_nice_string("qjhvhtzxzqqjkmpb"))
Exemplo n.º 7
0
 def test_part_2_case_2(self):
     self.assertTrue(Day5.part_2_is_nice_string("xxyxx"))
Exemplo n.º 8
0
    def test_findSeatRowCol(self):

        self.assertEqual(Day5.findSeatRowCol(self.boardingPass1), (70, 7))
        self.assertEqual(Day5.findSeatRowCol(self.boardingPass2), (14, 7))
        self.assertEqual(Day5.findSeatRowCol(self.boardingPass3), (102, 4))
        self.assertEqual(Day5.findSeatRowCol(self.boardingPass4), (44, 5))
Exemplo n.º 9
0
 def test_part_1_case_5(self):
     self.assertFalse(Day5.part_1_is_nice_string("dvszwmarrgswjxmb"))
Exemplo n.º 10
0
 def test_part_1_case_2(self):
     self.assertTrue(Day5.part_1_is_nice_string("aaa"))
Exemplo n.º 11
0
 def test_part_1_case_3(self):
     self.assertFalse(Day5.part_1_is_nice_string("jchzalrnumimnmhp"))
Exemplo n.º 12
0
 def test_part_2_case_4(self):
     self.assertFalse(Day5.part_2_is_nice_string("ieodomkazucvgmuy"))
Exemplo n.º 13
0
 def test_part_1_case_1(self):
     self.assertTrue(Day5.part_1_is_nice_string("ugknbfddgicrmopn"))
Exemplo n.º 14
0
 def test_part_2_case_3(self):
     self.assertFalse(Day5.part_2_is_nice_string("uurcxstgmygtbstg"))
Exemplo n.º 15
0
 def test_part_2_case_2(self):
     self.assertTrue(Day5.part_2_is_nice_string("xxyxx"))
Exemplo n.º 16
0
 def test_part_2_case_1(self):
     self.assertTrue(Day5.part_2_is_nice_string("qjhvhtzxzqqjkmpb"))
Exemplo n.º 17
0
 def test_part_1_case_2(self):
     self.assertTrue(Day5.part_1_is_nice_string("aaa"))
Exemplo n.º 18
0
 def test_testdata1(self):
     self.assertEqual(Day5.solve("testdata1.txt"), 10)
Exemplo n.º 19
0
 def test1(self):
     self.assertTrue(Day5.generate_password('abc') == '18f47a30')
Exemplo n.º 20
0
 def test_part_1_case_3(self):
     self.assertFalse(Day5.part_1_is_nice_string("jchzalrnumimnmhp"))
Exemplo n.º 21
0
 def test_part_1_case_4(self):
     self.assertFalse(Day5.part_1_is_nice_string("haegwjzuvuyypxyu"))
Exemplo n.º 22
0
 def test_part_1_case_4(self):
     self.assertFalse(Day5.part_1_is_nice_string("haegwjzuvuyypxyu"))
Exemplo n.º 23
0
 def test_puzzledata(self):
     self.assertEqual(Day5.solve("puzzledata.txt"), 10638)
Exemplo n.º 24
0
 def test_part_1_case_5(self):
     self.assertFalse(Day5.part_1_is_nice_string("dvszwmarrgswjxmb"))