def test_part1(self): self.assertEqual(Day17.solve_part1(self.input), 112)
def test_part2(self): self.assertEqual(Day17.solve_part2(self.input), 848)
def setUp(self): self.input = Day17().read_file("tests/test_day17.txt")
def test_part1(self): self.assertEqual(Day17.solve_part1("ihgpwlah"), "DDRRRD") self.assertEqual(Day17.solve_part1("kglvqrro"), "DDUDRLRRUDRD") self.assertEqual(Day17.solve_part1("ulqzkmiv"), "DRURDRUDDLLDLUURRDULRLDUUDDDRR")
def test_part2(self): self.assertEqual(Day17.solve_part2("ihgpwlah"), 370) self.assertEqual(Day17.solve_part2("kglvqrro"), 492) self.assertEqual(Day17.solve_part2("ulqzkmiv"), 830)
def test_part1(self): self.assertEqual(Day17.solve(self.input, (25, False)), 4)
def test_part2(self): self.assertEqual(Day17.solve(self.input, (25, True)), 3)
def test_part1(self) -> None: output = 638 actual = Day17.solve_part1(self.input) self.assertEqual( actual, output, f"input={self.input}, expected={output}, actual={actual}")