Skip to content

Top-level @testsets stop on errors #21594

@wavexx

Description

@wavexx

@testset should constitute rollback points for exceptions (execution should continue on the next testset), and indeed it's the case, but only for nested testsets:

using Base.Test
@testset "outer" begin
    @testset "inner" begin
        @test true
        @assert false
    end
    @testset "inner2" begin
        @test true
    end
end
@testset "next" begin
    @test true
end

Summary shows:

Test Summary: | Pass  Error  Total
outer         |    2      1      3
  inner       |    1      1      2
  inner2      |    1             1

inner2 is run, but "next" is not. It seems this is triggered by finalize(), which stops on error at the top level. Is this intended, and if so, why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    priorityThis should be addressed urgentlytestsystemThe unit testing framework and Test stdlib

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions