-
Notifications
You must be signed in to change notification settings - Fork 46
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
Runtime skipping of tests #162
Comments
I could see a case to be made that fixtures should only be the things to support runtime skipping as what is most likely missing is a fixture. Some of these fixtures might be more environment related ("am I running in nightly rust", "is git present") but I could see still creating simple fixtures for those cases to be useful for reporting to a user why a test was skipped. |
Can you give me some example? I suspect that you can already use rust annotation to skip or ignore tests. |
Cargo's has tests that only run on nightly or require git. We originally had guards at the start test functions and then moved it into our own wrapper around libtest, see rust-lang/cargo#9892 |
Ok, now I've understand the feature. Seams nice and useful.... But now I've no too much time to work on it. I hope to find some time to implement it but I don't know when :( |
Something I've found useful from pytest is the ability for a test (or a fixture) to be able to report that it is skipped. When a fixture is skipped, all dependencies are automatically skipped as well.
For example, in cargo's tests we have our own test macro that allows us to skip tests if you aren't running on nightly or if you don't have git. Due to how libtest works, these get reported as "passed" rather than "ignore" or "skipped".
Being able to support this natively and report it correctly to the user would be a big help!
The text was updated successfully, but these errors were encountered: