Skip to content

How to use InlineTest? #5

Closed
Closed
@cmcaine

Description

@cmcaine

When using @testset "inline", i.e. within the source-code of a package, one can use the InlineTest package instead of ReTest, which only defines the strict minimum and also exports @testset, and therefore loads faster (even if ReTest itself loads fast, it can be desirable to have an even lighter dependency). But ReTest still has to be loaded (as a "test" dependency) in order to call retest.

How do I do this?

I've tried

using InlineTest

@testset "foo" begin
    @test 1 == 2
end

using ReTest

runtests()

and

module inner

using InlineTest

@testset "foo" begin
    @test 1 == 2
end

end

using ReTest

runtests()

And in both cases no tests are executed.

Replacing InlineTest with ReTest in either example works as expected.

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