import pytest
from helpers.test_helpers import *
@pytest.mark.parametrize('inputs, expected', [
(["No commas", "1,1"], "Your coordinates format is invalid! Please enter as x,y.\n"),
(["Not, the, right, size, I, fear", "1,1"], "Your coordinates must be 2 numbers!\n"),
(["Need numbers, despite correct size", "1,1"], "Your coordinates must be 2 numbers!\n"),
(["0,1,2,3,4,5", "1,1"], "Your coordinates must be 2 numbers!\n"),
(["4,0", "1,1"], "Make sure that the location is valid!\n"),
(["0,4", "1,1"], "Make sure that the location is valid!\n"),
(["4,1", "1,1"], "Make sure that the location is valid!\n"),
(["1,4", "1,1"], "Make sure that the location is valid!\n"),
(["I don't like commas", "222", ",,,", "digit,digit", "digit,2", "2,digit", "2,2,2", "1,4", "4,1", "1,1"], "Your coordinates format is invalid! Please enter as x,y.\nYour coordinates format is invalid! Please enter as x,y.\nYour coordinates must be numbers!\nYour coordinates must be numbers!\nYour coordinates must be numbers!\nYour coordinates must be numbers!\nYour coordinates must be numbers!\nMake sure that the location is valid!\nMake sure that the location is valid!\n"),
(["2,2"], ""),
(["1,3"], ""),
(["3,1"], "")
])
def test_ask_coordinates(inputs, expected):
assert intercept(gogo_ask_coordinates, inputs) == expected
-
Adam Blank authoredc07e830d