import pytest from src.harder_computer import is_valid_shot from tests.helpers.naming import apply_names @pytest.mark.parametrize('input1, input2, expected', apply_names('is_valid_shot', [True, True, False], [ ((0, 0), [], True), ((-1, 0), [], False), ((8, 0), [], False), ((0, -1), [], False), ((0, 8), [], False), ((0, 0), [(0,0)], False), ((2, 5), [(0,0), (1,1), (2,5), (3,7)], False), ((2, 5), [(0,0), (1,1), (3,7)], True), ])) def test_is_valid_shot(input1, input2, expected): result = is_valid_shot(input1, input2) assert expected == result, (f"On an 8x8 board, the following inputs to the is_valid_shot " f"function:\n{input1}, {input2}\nlead to the following output:" f"\n{result}\nwhen we expect:\n{expected}.")