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

Should "No Tests" indicate a failure? #34372

Open
nickrobinson251 opened this issue Jan 14, 2020 · 1 comment
Open

Should "No Tests" indicate a failure? #34372

nickrobinson251 opened this issue Jan 14, 2020 · 1 comment
Labels
testsystem The unit testing framework and Test stdlib

Comments

@nickrobinson251
Copy link
Contributor

This was raised in #26166 but I think no explicit decision was made.

Current behaviour is not indiciative of "no tests" being an issue at all.

julia> using Test

julia> @testset "" begin
           ""
       end
Test Summary: |
              | No tests
Test.DefaultTestSet("", Any[], 0, false)

One possibility would simply be to use color to print the "No tests" message in the "warning" (yellow) color, rather than the more neutral "info" (blue color), though of course that doesn't affect the no-color output.

I've no opinion here, but it was raised at work and i couldn't find another issue/discussion on it.

@fredrikekre fredrikekre added the testsystem The unit testing framework and Test stdlib label Jan 14, 2020
@DilumAluthge
Copy link
Member

I think it makes sense for an empty testset (a testset with no tests) to throw an error. After all, in what situation would a testset with no tests be the desired behavior?

This would probably be breaking, right? So in Julia 1.x it would print a warning, and in Julia 2.0 it would throw an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testsystem The unit testing framework and Test stdlib
Projects
None yet
Development

No branches or pull requests

3 participants