Commit 8081863a authored by Adam Blank's avatar Adam Blank
Browse files

Update test_apply_direction.py

parent 70feae49
No related merge requests found
Pipeline #118944 canceled with stage
Showing with 10 additions and 11 deletions
+10 -11
...@@ -2,19 +2,18 @@ import pytest ...@@ -2,19 +2,18 @@ import pytest
from src.harder_computer import apply_direction from src.harder_computer import apply_direction
from tests.helpers.naming import apply_names from tests.helpers.naming import apply_names
@pytest.mark.parametrize('input1, input2, expected', apply_names('apply_direction', [True, True, False], [ @pytest.mark.parametrize('input1, input2, expected', apply_names('apply_direction', [True, True, False], [
((0, 0), (0,0), (0,0)), ((0, 0), (0, 0), (0, 0)),
((0, 0), (1,0), (1,0)), ((0, 0), (1, 0), (1, 0)),
((0, 0), (-1,0), (-1,0)), ((0, 0), (-1, 0), (-1, 0)),
((0, 0), (0,1), (0,1)), ((0, 0), (0, 1), (0, 1)),
((0, 0), (0,-1), (0,-1)), ((0, 0), (0, -1), (0, -1)),
((1, 2), (0,0), (1,2)), ((1, 2), (0, 0), (1, 2)),
((3, 2), (-1,-1), (2,1)), ((3, 2), (-1, -1), (2, 1)),
((1, 3), (5,5), (6,8)), ((1, 3), (5, 5), (6, 8)),
])) ]))
def test_apply_direction(input1, input2, expected): def test_apply_direction(input1, input2, expected):
result = apply_direction(input1, input2) result = apply_direction(input1, input2)
assert expected == result, (f"On an 8x8 board, the following inputs to the apply_direction " assert expected == result, (f"On an 8x8 board, the following inputs to the apply_direction "
f"function:\n{input1}, {input2}\nlead to the following output:" f"function:\n {input1} and {input2}\n lead to the expected output:\n {expected}.")
f"\n{result}\nwhen we expect:\n{expected}.")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment