Exemple #1
0
 def test_create_pet(self):
     self.assertIsInstance(
         pet.create_pet(age=12, name='Clifford', species='Dog'), pet.Pet)
Exemple #2
0
def main():
    clifford = pet.create_pet('Clifford', 'Dog', 12)
    print('This dog is %d years old.' % clifford.get_age())
    print(clifford)
Exemple #3
0
import player
import pet

pet.create_pet("Coco")

print(pet.display_information(pet.get_pet("coco")))
Exemple #4
0
def main():
    p = pet.create_pet("Polly", "Parrot")
    print(p, p.get_name(), p.get_species())