Esempio n. 1
0
def test_move():
    """
        Test de la fonction move
    """
    with pytest.raises(NotImplementedError):
        test_animal = Animal("Test", 5, 10, "testing")
        test_animal.move()
Esempio n. 2
0
def test_animal_move():
    """
        module de test pour verifier l'exception move()
    """
    my_animal_1 = Animal(name="my_animal_move")
    print(my_animal_1.to_string())
    try:
        my_animal_1.move()
    except NotImplementedError:
        print("animal is OK ! ")