Data-driven testing
Alex Martelli
aleax at aleax.it
Thu Apr 24 02:51:07 EDT 2003
Peter Hansen wrote:
> Aahz wrote:
>>
>> Which brings up the question: do the unit-testers here write tests for
>> throwaway scripts?
...
> Basically, with a literally throwaway script, you do lose much of
> the business value of the tests, so as far as I can see you write
> them only if they truly help you write the code properly, which
> should once you're proficient at TDD and then only sometimes, since
> you're a very experienced programmer. Otherwise, and certainly in some
> cases no matter who you are, they really would be a waste of time.
> IMHO. Except maybe to help you develop the habits. _Four_ reasons...
Oh come on -- we all know that some "throw-away" scripts happen
to NOT get thrown away, but rather lie around and get reused and
tweaked and grown and... It's hard to quantify HOW MANY such
"throw-away" scripts are in fact thrown away, and how many end
up getting kept (and reused and grown) instead -- guess it depends
on how good one is at planning / forecasting -- but as for me,
I would paraphrase Brooks' MMM Chapter 11's famous title:
Plan NOT to throw one away -- you won't, anyway.
Alex
More information about the Python-list
mailing list