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

Running test prints long output that seems like it should be suppressed #212

Open
LucasMontoya4 opened this issue May 3, 2024 · 1 comment
Labels

Comments

@LucasMontoya4
Copy link
Collaborator

I just cloned the master and set it up on my laptop for a clean start, and running the tests seems to do everything in working order, including giving the expected output

Test Summary:         |   Pass  Broken   Total     Time
moment_kinetics tests | 118503       2  118505  6m23.8s

However, after this line (which used not to happen) is a long printout of lists, which starts with

Test.DefaultTestSet("moment_kinetics tests", Any[Test.DefaultTestSet("calculus", Any[Test.DefaultTestSet("fundamental theorem of calculus", Any[Test.DefaultTestSet("finite_difference 5 1", Any[]...

and so on. Is this output meant to be suppressed somewhere?

@johnomotani
Copy link
Collaborator

Yeah, I've noticed the same thing - I think what has happened is that Test.jl returns this Test.DefaultTestSet struct so that you can (if you wanted to) query it for more information than just what was printed out to the terminal, and then Julia prints it by default (when you run the tests from the REPL).
I don't know why it didn't get printed before - maybe Test.jl didn't return the struct, or hadn't defined a method to print it, or Julia's 'print a generic struct' functionality got 'upgraded' so that it now prints stuff where it didn't before.

We might be able to modify the runtest() functions in the tests so that they all end with return nothing. On the other hand maybe these Test.DefaultTestSet things could be useful at some point. The workaround is to put a semicolon after the command in the REPL, e.g.

julia> include("moment_kinetics/test/runtests.jl");

I always forget to do that and have to scroll up past the annoying output, but I think it's good enough to not need to change our test functions.

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

No branches or pull requests

2 participants