def test_feeding_enclo(): """ fonction test_feeding_enclo """ test_animal1 = Animal("Test1", 5, 10, "testing1") test_animal2 = Animal("Test2", 10, 10, "testing2") test_enclosure = Enclosure("test", [test_animal1, test_animal2]) test_enclosure.feed_all(50) print(test_animal1.get_life_point()) print(test_animal2.get_life_point())
def test_feed_all(): """ test:permet de retirer un Animal de la liste en fonction de sa position dans la liste """ test_animal1 = Animal("Test1", 5, 10, "testing1") test_animal2 = Animal("Test2", 10, 10, "testing2") test_enclosure = Enclosure("test", [test_animal1, test_animal2]) test_enclosure.feed_all() assert test_animal1.get_life_point() == 10 assert test_animal2.get_life_point() == 15