2022/day01: Remove debug lines and update tests

day07
earnest ma 2022-12-01 22:33:51 -05:00
parent ffc20daadd
commit 85107c66c3
Signed by: earnest ma
GPG Key ID: A343F43342EB6E2A
2 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -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