Test::Builder appends all Ok's to a structure it can return via
$tb->details. These Ok's have the fields 'ok' and 'actual_ok'. 'actual_ok'
is the true/false value passed to $tb->ok, 'ok' is adjusted to be true if
the test was run under TODO.


The bug is in subtest handling. When you start a subtest you essentially
create a new Test::Builder singleton, and the TODO state is clear int he
new one, but it has a field 'parent_TODO' that gets set. This is used to
ensure that failures in a subtest when the parent has TODO set do not count
as actual failures.

The problem is that parent_todo is not considered when setting the OK's in
the details in subtests. That means if a subtest ok fails, and the parent
is in todo, the 'ok' and 'actual_ok' are both set to false.

The fix is easy, just change line 845 to look at parent_TODO. However this
breaks Test::ClassMoose because it uses details to verify its results.

I spoke with autarch about this test since he is the current maintainer. He
agrees with me that 'ok' should be true in that test, and that this is
probably a bug.

I have not yet figured out what else this may break on cpan, I will try to
do that tomorrow.

*What I am looking for from cpan-workers:*

1) Do you think this is actually a bug, or does it work as you think it
2) Even if we all agree it is a bug, can we fix it, or do we need to
preserve it to avoid breaking things?


Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 4 | next ›
Discussion Overview
groupcpan-workers @
postedDec 22, '15 at 12:04a
activeDec 22, '15 at 5:07a

2 users in discussion

Chad Granum: 3 posts Karen Etheridge: 1 post



site design / logo © 2021 Grokbase