Beispiel #1
0
 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)
Beispiel #2
0
 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")
Beispiel #3
0
 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)
Beispiel #4
0
 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)