Data-driven testing

Changjune Kim juneaftn at REMOVETHIShanmail.net
Wed Apr 23 12:24:56 EDT 2003


"Aahz" <aahz at pythoncraft.com> wrote in message
news:b86e9f$c15$1 at panix1.panix.com...
> In article <b86bqd$iu4$1 at news.hananet.net>,
> Changjune Kim <juneaftn at REMOVETHIShanmail.net> wrote:
> >"Aahz" <aahz at pythoncraft.com> wrote in message
> >news:b867d7$f53$1 at panix2.panix.com...
> >>
> >> While writing it, it occurred to me that I *ought* to be using unit
> >> tests to make sure that it was working correctly, but two things
stopped
> >> me.  Secondly, I was in a hurry.
> >
> >On the second:
> >
> >KentBeck : "If you write automated tests, you'll get more done every
day."
> >Johnny : "But we have too much to do. We don't have time to write
tests."
> >KentBeck : "No, no. You didn't understand. You'll get _more_ done, not
> >less."
> >Johnny : "Yes, but we don't have time for testing."
>
> Yes, I know; I didn't realize this would be a "program" rather than a
> "script" until I started writing it...
>
> Which brings up the question: do the unit-testers here write tests for
> throwaway scripts?

I do. :) More often than not I regret it after I write any piece of code
without tests, whether it's throw-away or not. Writing tests, it's more
enjoyable, less stressful and I learn more.





More information about the Python-list mailing list