예제 #1
0
def test_speak():
    """
        Test de la fonction speak
    """
    test_animal = Animal("Test", 5, 10, "testing")
    try:
        test_animal.speak()
    except NotImplementedError:
        print("NOtImplementedError a été déclenché dans test animal")
예제 #2
0
def test_animal_speak():
    """
        module de test pour verifier l'exception speak()
    """
    my_animal_1 = Animal(name="my_animal_speak")
    print(my_animal_1.to_string())
    try:
        my_animal_1.speak()
    except NotImplementedError:
        print("animal is OK ! ")