You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If from a testset you call a function that contains a testset that contains a return, then any test failures after the point the functions are called will not actually cause the outer testset to fail.
Encountered this in the wild (fix is in invenia/Models.jl#16)
where someone thought they could return a value from a testset to use in later tests.
This ended up resulting in ony of our packages passing CI but actually failing tons of tests, and noone noticed for months because they trusted CI and just looked at the end of the tests to see if there was a failure message.
julia>functioncheck_foo()
@testset"Test Foo"begin@testtruereturnrand()
endend
check_foo (generic function with 1 method)
julia> k =@testset"main"begincheck_foo()
@testfalseend
Test Foo: Test Failed at REPL[7]:3
Expression:false
Stacktrace:
[1] top-level scope at REPL[7]:3
[2] top-level scope at /usr/local/src/julia/julia-1.5/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1114
[3] top-level scope at REPL[7]:2
Test.DefaultTestSet("main", Any[Test.DefaultTestSet(#= circular reference @-2 =#)], 0, false)
julia> k.anynonpass
false
If from a testset you call a function that contains a testset that contains a return, then any test failures after the point the functions are called will not actually cause the outer testset to fail.
Encountered this in the wild (fix is in invenia/Models.jl#16)
where someone thought they could return a value from a testset to use in later tests.
This ended up resulting in ony of our packages passing CI but actually failing tons of tests, and noone noticed for months because they trusted CI and just looked at the end of the tests to see if there was a failure message.
Probably related to #32937
The text was updated successfully, but these errors were encountered: