classPerson(metaclass=LazyInit):def__init__(self, name, age):passclassCircle(metaclass=LazyInit):def__init__(self, x, y, ray):pass
a_person = Person('Luke',21)# Use test.describe (or Test.describe) to describe your test suite
test.describe("Basics")# Use "it" calls to describe the specific test case
test.it("should work with first example test case")# you can also use the lower level test.expect. If you use test.expect directly then# you should provide a custom error message, as the default one will be pretty useless# to users trying to pass the kata.
test.expect(a_person.name =='Luke','Ehi, my name is Luke')
test.expect(a_person.age ==21,'Ehi, I`m 21 years old')# Use test.describe (or Test.describe) to describe your test suite
test.describe("More arguments")# Use "it" calls to describe the specific test case
test.it("should work with different numbers of arguments")
a_circle = Circle(0,0,5)
test.expect(a_circle.x ==0,'X coordinate is 0')
test.expect(a_circle.y ==0,'Y coordinate is 0')
test.expect(a_circle.ray ==5,'The ray is 5')classCar(metaclass=LazyInit):def__init__(self, model, color, plate, year):passclassNothing(metaclass=LazyInit):def__init__(self, nothing):pass
a_car = Car('Ford Ka','Blue','AF329SZ',1999)
a_nothing = Nothing('nothing')
test.expect(a_car.model =='Ford Ka','I`m a KA')
test.expect(a_car.color =='Blue','Yeah I`m blue but not sad!!')
test.expect(a_car.plate =='AF329SZ','My number is AF329SZ... call me!!')
test.expect(a_car.year==1999,'I`m still young yuo know!!')
test.expect(a_nothing.nothing =='nothing','I`m nothing!!!')