how about surrounding the statement with a try and work the leap year to regular year case with the exception?
On Aug 3, 10:16 am, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > Jonathan Buchanan wrote: > > > > > >http://toys.jacobian.org/presentations/2007/oscon/tutorial/ > > > Slide 14, unit tests too! :) > > >>> dob = date(1980,2,29) > >>> dob.replace(year=2007) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ValueError: day is out of range for month > > it ain't a particularly useful unit test in my case ;-))) > > - bram --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

