Fergal Daly wrote:
> One of the supposed benefits of using TODO is that you will notice
> when the external module has been fixed. That's reasonable but I don't
> see a need to inflict the confusion of unexpectedly passing tests on
> all your users to achieve this.

Maybe we should just change the wording and presentation so we're not
inflicting so much.

Part of the problem is it screams "OMG!  UNEXPECTEDLY SUCCEEDED!" and the user
goes "whoa, all caps" and doesn't know what to do.  It's the most screamingest
part of Test::Harness 2.

Fortunately, Test::Harness 3 toned it down and made it easier to identify them.

Test Summary Report
-------------------
/Users/schwern/tmp/todo.t (Wstat: 0 Tests: 2 Failed: 0)
  TODO passed:   1-2

TAP::Parser also has a "todo_passed" test summary method so you can
potentially customize behavior of passing todo tests at your end.


I agree with Eric, these tests are extra credit.  "Unexpectedly working
better" != "failure" except in the most convoluted situations.  Their
intention is to act as an alternative to commenting out a test which you can't
fix right now.  An executable TODO list that tells you when you're done, so
you don't forget.

It should not halt installation, nothing's wrong as far as the user's
concerned.  However, it does mean "investigate" and it would be nice if this
information got back to the author.  It would be nice if CPAN::Reporter
reported passing TODO tests... somehow.


> Another downside of using TODO like this is that when the external
> module is fixed, you have to release a new version of your module with
> the TODOs removed. These tests will start failing for anyone who
> upgrades your module but not broken one but in reality nothing has
> changed for that user,

As long as you're releasing a new version, why would you not upgrade your
module's dependency to use the version that works?


-- 
I am somewhat preoccupied telling the laws of physics to shut up and sit down.
        -- Vaarsuvius, "Order of the Stick"
           http://www.giantitp.com/comics/oots0107.html

Reply via email to