def test_card_is_cursor_on_function_work(self): card = Card(one, one, tuple_ones) for x in range(0, card_width + 100): for y in range(0, card_height + 100): if x < card_width and y < card_height: assert card.is_cursor_on(x, y) else: assert not card.is_cursor_on(x, y)
def test_card_is_cursor_on_function_second_argument_is_not_number(self): with pytest.raises(CardFunctionParameterException): card = Card(one, one, tuple_ones) card.is_cursor_on(one, "Tests")
def test_card_is_cursor_on_function_second_argument_is_decimal(self): with pytest.raises(CardFunctionParameterException): card = Card(one, one, tuple_ones) card.is_cursor_on(one, 3.5)
def test_card_is_cursor_on_function_first_argument_is_negative(self): with pytest.raises(CardFunctionParameterException): card = Card(one, one, tuple_ones) card.is_cursor_on(-1, one)