Skip to content

Commit af7792e

Browse files
committed
update tests
1 parent ab217e0 commit af7792e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/year_2025/test_day_01.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from advent_of_code.year_2025.day_01 import (
33
solve,
44
turn_dial,
5+
passing_zero_counter,
56
)
67

78

@@ -48,3 +49,20 @@ def test_solver(day_01_test_input, day_01_expected_output):
4849
def test_turn_dial(current_position, turn_direction, distance, expected_new_position):
4950
new_position = turn_dial(current_position, turn_direction, distance)
5051
assert new_position == expected_new_position
52+
53+
@pytest.mark.parametrize(
54+
"start_position, turn_direction, distance, expected_count",
55+
[
56+
(50, 1, 1000, 10),
57+
# (50, 1, 49, 0),
58+
# (50, -1, 49, 0),
59+
# (50, -1, 50, 1),
60+
# (50, -1, 51, 1),
61+
# (99, 1, 1, 1),
62+
# (99, -1, 1, 0),
63+
# (0, 1, 100, 1),
64+
]
65+
)
66+
def test_passing_zero_counter(start_position, turn_direction, distance, expected_count):
67+
count = passing_zero_counter(start_position, turn_direction, distance)
68+
assert count == expected_count

0 commit comments

Comments
 (0)