def test_part2(self): dir_path = os.path.dirname(os.path.realpath(__file__)) data = [] with open(os.path.join(dir_path, 'inputs', 'test_input'), 'r') as f: for line in f: data.append(int(line.strip())) self.assertEqual(main.Part2(data), 241861950)
def test_part2_invalid(self): dir_path = os.path.dirname(os.path.realpath(__file__)) file_path = os.path.join(dir_path, 'inputs', 'invalid') self.assertEqual(main.Part2(file_path), 0)
def test_part2(self): dir_path = os.path.dirname(os.path.realpath(__file__)) filename = os.path.join(dir_path, 'inputs', 'test_input') self.assertEqual(main.Part2(filename), 336)