21 lines
637 B
Python
21 lines
637 B
Python
import pytest
|
|
|
|
from main import process_instructions, process_robo_instructions
|
|
|
|
@pytest.mark.parametrize('given, expected',
|
|
[
|
|
('>', 2),
|
|
('^>v<', 4),
|
|
('^v^v^v^v^v', 2)
|
|
])
|
|
def test_instructions(given, expected):
|
|
assert process_instructions(given) == expected
|
|
|
|
|
|
@pytest.mark.parametrize('given, expected',
|
|
[
|
|
('^v', 3)
|
|
])
|
|
def test_part2_instructions(given, expected):
|
|
assert process_robo_instructions(given) == expected
|