Re: avoid the redefinition of a function

Discussion in 'Python' started by Tim Chase, Sep 12, 2012.

  1. Tim Chase

    Tim Chase Guest

    On 09/12/12 16:47, D'Arcy Cain wrote:
    > On Wed, 12 Sep 2012 16:37:11 -0400
    > Terry Reedy <> wrote:
    >> assures one that the test is being run. (I don't always test first, but
    >> I once discovered a test not being run when I modified it in a way that
    >> should have made it fail, but it didn't.)

    >
    > 1. Write the test
    > 2. Run the test - make sure it fails
    > 3. write code until test passes
    > 4. Stop writing code
    >
    > People underestimate the importance of steps 2 and 4. Number 2 is
    > important because a test that can't fail is worse than useless. Number
    > 4 is important because it prevents code that doesn't have a
    > corresponding test. If you feel the need to write more code then go
    > back to step 1.
    >
    > And run all of your tests every day. You will sleep better at night.


    Though I usually try to do test-driven development, I confess a
    fondness for Titus Brown's "Stupidity driven testing"[1] :)

    -tkc

    [1]
    http://ivory.idyll.org/blog/stupidity-driven-testing.html
    (one of my most memorable pearls from PyCon'07)
     
    Tim Chase, Sep 12, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jabba Laci

    avoid the redefinition of a function

    Jabba Laci, Sep 12, 2012, in forum: Python
    Replies:
    2
    Views:
    194
    Ramchandra Apte
    Sep 12, 2012
  2. D'Arcy Cain
    Replies:
    0
    Views:
    189
    D'Arcy Cain
    Sep 12, 2012
  3. Michael Torrie

    Re: avoid the redefinition of a function

    Michael Torrie, Sep 12, 2012, in forum: Python
    Replies:
    0
    Views:
    191
    Michael Torrie
    Sep 12, 2012
  4. Jabba Laci
    Replies:
    3
    Views:
    205
    Peter Otten
    Sep 13, 2012
  5. Tim Chase
    Replies:
    0
    Views:
    181
    Tim Chase
    Sep 12, 2012
Loading...

Share This Page