-
Notifications
You must be signed in to change notification settings - Fork 8
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
Conditional tests (skipping testitems) #97
Comments
yeah, this sounds like a nice feature! So far, in the couple cases something like this could have been used, i've just seen the i guess we'd want the Perhaps, we'd log still something like
and still have this test item show up in the test results summary table (as skipped)? |
One workaround would be to use Another workaround would be to give each test item a tag (like tags_to_filter_out = get_tags_to_filter_out(...)
runtests(PkgName) do ti
isdisjoint(ti.tags, tags_to_filter_out)
end |
another use-case for this we just ran into: skipping certain tests (e.g. JET) on pre-release versions on Julia e.g. |
Some tests of a project of mine can only run on specific Julia versions. Currently, I have:
ReTestItems.jl does not like this:
LoadError: Test files must only include `@testitem` and `@testsetup` calls.
Putting the conditional within the testitem doesn't always work, e.g,. when using types that are only conditionally defined:
I could make the test
@static
, but that's not really intuitive to most users. Furthermore, it still results in the skipped test item being shown on stdout, with a warning that it doesn't contain any tests:Is there another workaround? Maybe
@testitem
should support passing-in askip
boolean or so?The text was updated successfully, but these errors were encountered: