Пример #1
0
def test_weight():
    z = factory.Zoo('zoo.csv')
    assert sum(animal.weight for animal in z.animals) == 48.4
Пример #2
0
def test_zoo():
    z = factory.Zoo('zoo.csv')
    assert [animal.say()
            for animal in z.animals] == ['Woof', 'Meow', 'Meow', 'Tweet']
Пример #3
0
def test_weight():
    z = factory.Zoo('zoo.csv')
    assert sum(animal.weight() for animal in z.get_animals()) == 49.6
Пример #4
0
def test_zoo():
    z = factory.Zoo('zoo.csv')
    # + Platypus,Perry,1.2 -> Quack
    assert [animal.say() for animal in z.get_animals()
            ] == ['Woof', 'Meow', 'Meow', 'Quack', 'Tweet']
Пример #5
0
def test_weight():
    z = factory.Zoo('zoo.csv')
    # + Platypus,Perry,1.2
    assert sum(animal.get_weight() for animal in z.get_animals()) == 49.6
Пример #6
0
def test_zoo():
    z = factory.Zoo('zoo.csv')
    print(z)
    assert [animal.say()
            for animal in z.get_animal()] == ['Woof', 'Meow', 'Meow', 'Tweet']