#!/usr/bin/python import unittest import main class ExamplesPart1(unittest.TestCase): def test_example1(self): lines = ["ugknbfddgicrmopn", "aaa"] self.assertEqual(main.solve_part1(lines), 2) def test_example2(self): lines = ["jchzalrnumimnmhp", "haegwjzuvuyypxyu", "dvszwmarrgswjxmb"] self.assertEqual(main.solve_part1(lines), 0) class ExamplesPart2(unittest.TestCase): def test_example1(self): lines = ["qjhvhtzxzqqjkmpb", "xxyxx"] self.assertEqual(main.solve_part2(lines), 2) def test_example2(self): lines = ["uurcxstgmygtbstg", "ieodomkazucvgmuy"] self.assertEqual(main.solve_part2(lines), 0) if __name__ == "__main__": unittest.main()