New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing tests counted but displayed as TODO with $TODO defined but false #812
Comments
a defined but falsy $TODO making TODO effective is a legacy Test::More behavior, too late to debate the behavior without breaking things (Though if it were not too late I would be on the side of a false value disabling todo). However it is absolutely a bug that it displays the TODO but counts a failure, it should not count a failure. |
Thanks for picking this up! Can you give me a hint where this is to be fixed or are you going to fix it yourself? |
it is probably somewhere in Test2::API::Hub, if not there then maybe in Test2::Event::*. I will fix it when I have a moment, but probably not today. |
Previous fix for #812 was incorrect. Fixes #829 The original issue is that a TODO = '' would result in a failing test, but diagnostics that report TODO MY original fix was to make TODO = '' set todo, which was incorrect The correct fix was to make the diagnostics not incorrectly report a TODO when it is set to ''. To add consfusion, Test::Builder always ignores TODO = '', but does NOT ignore TB->set_todo('').... That is a legacy behavior that must be preserved :-(
Test::More seems to behave inconsistently when
$TODO
has a defined but false value. A failing test is counted for the test summary but is displayed as TODO test. That is really confusing.The following test file illustrates the issue:
Only the first and the two last failing tests are displayed consistently. The other 3 are both TODO and not-TODO:
I am not sure whether
$TODO
defined but false should make a test TODO or not TODO. Most of the false values seem not to be a useful TODO message but having""
for no message at all might be desirable.Unfortunately I also don't know enough about the guts of Test::More to provide a fix. I'd gladly do with some hints.
The text was updated successfully, but these errors were encountered: