Exemplo n.º 1
0
def test_walk():  # base stats 5 health, 15 happiness, 0 hunger
    test = Animal()
    test.walk()  # happy + 5, hungry + 2
    assert (test.health == 4)  # time passes - 1 health
    assert (test.happiness == 20)
    assert (test.hunger == 3)  # time passes + 1 to hunger
Exemplo n.º 2
0
def test_walk():  # base stats 5 health, 15 happiness, 0 hunger
    test = Animal()
    test.walk()  # happy + 5, hungry + 2
    assert test.health == 4  # time passes - 1 health
    assert test.happiness == 20
    assert test.hunger == 3  # time passes + 1 to hunger