From 85107c66c36b3d5917536ba339d8174dd49d9825 Mon Sep 17 00:00:00 2001 From: earnest ma Date: Thu, 1 Dec 2022 22:33:51 -0500 Subject: [PATCH] 2022/day01: Remove debug lines and update tests --- 2022/day01.py | 4 ---- 2022/day01_test.py | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) 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