diff --git a/2022/day01.py b/2022/day01.py index 536443a..c984d5b 100644 --- a/2022/day01.py +++ b/2022/day01.py @@ -11,7 +11,6 @@ def part1(puzzle: TextIO) -> int: cur_cals = 0 for line in puzzle: - print(line) line = line.strip() if line != "": @@ -29,12 +28,9 @@ def part2() -> int: i = 0 while i <= 3 - 1: - print(calories) top = max(calories) - print(top) calories.remove(top) three_total += top - print(three_total) i += 1 diff --git a/2022/day01_test.py b/2022/day01_test.py index 3d696d0..149b0ad 100644 --- a/2022/day01_test.py +++ b/2022/day01_test.py @@ -6,5 +6,8 @@ from day01 import * def test_part1() -> None: puzzle = open("day01.txt") assert part1(puzzle) == 70613 - assert part2() == 205805 puzzle.close() + + +def test_part2() -> None: + assert part2() == 205805