Re: Unit Testing: a couple of questions

2008-10-30 Thread Emanuele D'Arrigo
Thank you all for the very instructive replies! Much appreciated! By the sound of it I just have to relax a little and acquire a little bit more experience on the matter as I go along. =) Thank you again! Manu -- http://mail.python.org/mailman/listinfo/python-list

Re: Unit Testing: a couple of questions

2008-10-28 Thread Marco Bizzarri
On Tue, Oct 28, 2008 at 3:56 PM, Emanuele D'Arrigo <[EMAIL PROTECTED]> wrote: > Hi everybody, > > I'm just having a go with Unit Testing for the first time and my > feeling about it in short is: Neat! > > I'm a bit worried about the time it's taking me to develop the tests > but after only a day or

Re: Unit Testing: a couple of questions

2008-10-28 Thread Mel
Emanuele D'Arrigo wrote: > I'm a bit worried about the time it's taking me to develop the tests > but after only a day or so I'm already much faster than when I started > with it and the code is already much improved in terms of robustness. > A couple of "philosophical" questions have emerged in th

Re: Unit Testing: a couple of questions

2008-10-28 Thread Orestis Markou
For the first bit, a colleague has recently asked the philosophical question, "How do you test what happens when the power goes down?" :) In other words, only test the bits that your code does. If you want to provide type checking, then yes, you have to test that. It's fair to assume that everyth

Re: Unit Testing: a couple of questions

2008-10-28 Thread Antoine De Groote
I'm wondering if don't want your class to look something like this: class myClass(): def __init__(self, data): self.__data = data def getData(self): return self.__data def setData(self, data): self.__data = data For the rest I'll let the experts argue, I don