コード例 #1
0
from project.animal import Animal
from project.dog import Dog

animal = Animal()
print(animal.eat())

dog = Dog()
print(dog.bark())
print(dog.eat())
コード例 #2
0
 def __init__(self, name):
     Animal.__init__(self, name)
コード例 #3
0
ファイル: main.py プロジェクト: borislavstoychev/Soft_Uni
 def test_animal(self):
     a = Animal()
     self.assertEqual(a.eat(), "eating...")
コード例 #4
0
 def test_animal(self):
     a = Animal()
     res = a.eat()
     self.assertEqual(res, "eating...")