Skip to content
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

failure message for no tests in a subtest is backwards #763

Open
karenetheridge opened this issue Feb 28, 2017 · 2 comments
Open

failure message for no tests in a subtest is backwards #763

karenetheridge opened this issue Feb 28, 2017 · 2 comments
Assignees

Comments

@karenetheridge
Copy link
Member

When there are no tests in a subtest block:

#   Failed test 'No tests run for subtest "Test::Kwalitee import"'

This message is backwards - the test name should always assert the passing condition.

@karenetheridge
Copy link
Member Author

karenetheridge commented Feb 28, 2017

http://grep.cpan.me/?q=No+tests+run+for+subtest+-file%3ATest%2FBuilder%5C.pm%24+-dist%3ATest-Simple+-dist%3Aperl

...shows that not too many things are referencing that exact string.

@exodist
Copy link
Member

exodist commented Apr 4, 2017

I think the main problem here is that diagnostics and assertions are being conflated. A subtest should fail when it has no assertions, but when it does the diagnostics should be more clear. There should be a line saying that the subtest failed, and another diagnostics line explaining why. The output should not imply that the test name involved having events within the subtest.

So yes, this is a bug, and it should be fixed, but I think simply dropping the 'No ' is a bad solution, and will still leave confusing diagnostics. I will ponder this and see if I can make the diagnostics clear and sane.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants