Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Early exit from @testitem #85

Open
MilesCranmer opened this issue Jul 21, 2024 · 2 comments
Open

Early exit from @testitem #85

MilesCranmer opened this issue Jul 21, 2024 · 2 comments

Comments

@MilesCranmer
Copy link

Often in my code I will have stuff like:

@testitem "my test" begin
    if VERSION >= v"1.8"
        using MyPkg
        do_stuff()
    end
end

It could be nice to have a way to exit early from a test instead, like

@testitem "my test" begin
    if VERSION < v"1.8"
        @testitembreak
    end
    using MyPkg
    do_stuff()
end
@davidanthoff
Copy link
Member

I was planning to adopt the skip option that ReTestItems.jl has, I think that would solve this problem? skip would accept an expression that gets evaluated.

@MilesCranmer
Copy link
Author

Nice! Yeah that would be perfect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants