Example #1
0
def test_increase_food(set_up_nest):
    position, color, size, health = set_up_nest
    food_amount = 3.5
    nest = Nest(position, color, size, health)
    nest.increase_food(food_amount)
    amount_tested = nest.food
    assert food_amount == amount_tested
Example #2
0
def test_increase_food(increase_food_fixed):
    food_amount = increase_food_fixed
    position = array.array('f', [0.5, 0.5])
    nest = Nest(position, "red", 2, 1)
    amount_tested = nest.increase_food(0.5)
    assert food_amount == amount_tested