[TIP] the best time to start doing a test?
Grig Gheorghiu
gheorghe_gheorghiu at yahoo.com
Mon Sep 29 10:48:35 PDT 2008
--- On Mon, 9/29/08, Alfredo Deza <arufuredosan at gmail.com> wrote:
>
> Right now I am in the middle of writing a web status script
> that keeps
> getting increasingly more complicated and bulky. Do I have
> to wait until I
> am satisfied with the script and then start writing tests?
> or should I start
> writing tests as soon as I start developing?
Hi, Alfredo
I'm a believer in TED -- 'Test Enhanced Development'. That is, you write some code, then you run, don't walk, as Fred said, and write a test for it. The process of writing the test usually results in modifying your code. And possibly modifying the test too. Lather, rinse, repeat.
As a rule of thumb, try to not leave any non-trivial functions/methods in your code untested before you move on to another module.
Grig
More information about the testing-in-python
mailing list