[Tutor] Please help to debug this function.. it takes a date and num. of days and returns startdate and enddate

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Mon Nov 6 17:09:29 CET 2006



On Mon, 6 Nov 2006, Asrarahmed Kadri wrote:

> I have written a function that takes a date and an integer representing 
> the number of days.
>
> Please test it, comment on the logic .


Hi Asrarahmed,

You should be able to write your own tests too.  You might want to look 
at:

     http://www.diveintopython.org/unit_testing/index.html

for an example of how to write unit tests; the author there goes through 
an example with a Roman Numeral program written with unit tests.


More information about the Tutor mailing list