Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@testset for
: avoid calling finish twice when it errors (#41715)
Here is a MWE: ```julia julia> using Test @testset "a" for i=1:2 @test i != 1 end a: Test Failed at REPL[3]:3 Expression: i != 1 Evaluated: 1 != 1 Stacktrace: [...] Test Summary: | Fail Total a | 1 1 Test Summary: | Fail Total a | 1 1 ERROR: Some tests did not pass: 0 passed, 1 failed, 0 errored, 0 broken. caused by: Some tests did not pass: 0 passed, 1 failed, 0 errored, 0 broken. ``` The `finish` function is called twice, and for a toplevel testset, this means throwing an error. This manifests in the above example by printing twice the result of the testset (with "Test Summary"), and by having "Error: ... caused by: ..." with the same message. Co-authored-by: Kristoffer Carlsson <[email protected]>
- Loading branch information