Subject: | runtests should not display diagnostics of failing TODO tests. |
run_tests displays the diagnostics of failing TODO tests. It should
not. Declaring a test TODO is a way of putting off fixing the test
until later. It allows one to return the test to a "passing" state when
you don't have time to fix anything. This allows you to see new failures.
Displaying the diagnostics of TODO tests clutters up the display. It
makes it likely that new failures and important diagnostic information
will be missed. Its similar to the reasons you make sure you quiet all
your warnings.
$ cat ~/tmp/todo.plx
#!/usr/bin/perl -w
use Test::More tests => 3;
is 42, 42;
is 23, 42;
TODO: {
local $TODO = 'Roman numerials still not a built in type';
is "XXIII", 23;
}
$ runtests ~/tmp/todo.plx
/home/schwern/tmp/todo....2/3 # Failed test in
/home/schwern/tmp/todo.plx at line 6.
# got: '23'
# expected: '42'
/home/schwern/tmp/todo....3/3 # Failed (TODO) test in
/home/schwern/tmp/todo.plx at line 9.
# got: 'XXIII'
# expected: '23'
# Looks like you failed 1 test of 3.
/home/schwern/tmp/todo....Failed 1/3 tests
Test Summary Report
-------------------
/home/schwern/tmp/todo.plx (Wstat: 256 Tests: 3 Failed: 1)
Failed tests: 2
Files=1, Tests=3, 0 wallclock secs ( 0.03 cusr + 0.00 csys = 0.03 CPU)