Skip to content

failing @test_logs hits method error for record #50

Open
@kleinschmidt

Description

@kleinschmidt

When using @test_logs, if there is a test failure, ReTest throws a method error:

  Got exception outside of a @test
  MethodError: no method matching record(::ReTest.Testset.ReTestSet, ::Test.LogTestFailure)
  Closest candidates are:
    record(::ReTest.Testset.ReTestSet, ::Test.AbstractTestSet) at ~/.julia/packages/ReTest/WnRIG/src/testset.jl:100
    record(::ReTest.Testset.ReTestSet, ::Union{Test.Broken, Test.Error, Test.Fail}) at ~/.julia/packages/ReTest/WnRIG/src/testset.jl:93
    record(::Test.FallbackTestSet, ::Test.LogTestFailure) at ~/.julia/juliaup/julia-1.8.2+0.aarch64/share/julia/stdlib/v1.8/Test/src/logging.jl:143
    ...
  Stacktrace:

Activity

kleinschmidt

kleinschmidt commented on Oct 5, 2022

@kleinschmidt
Author

As far as I can tell, fixing this would involve updating testset.jl to treat LogTestFailure the same as Test.Fail; should be pretty straightforward unless I'm missing something, since it does not appear that ReTest is actually using anything about the contents of Fail, just the existence in .results...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      failing `@test_logs` hits method error for `record` · Issue #50 · JuliaTesting/ReTest.jl