-
Notifications
You must be signed in to change notification settings - Fork 21
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
feature: ignore outputs in trycmd, only check successful exit #374
Comments
A proposal: turn on the "check status only" mode through the env var |
Can the output be made reproducible through redactions, including globs? If the output shouldn't be checked, shouldn't that be a default state, rather than relying on an env variable to opt-out? Are you wanting the ability to force an overwrite of the output? |
Yes precisely! I would like For my specific use case: I would like CI to ensure that the examples in my README continue to run successfully, but also reserve the ability to update them one in a while. AFAIK trycmd is the only library that can do this to a README file magically.
I do use some redactions, but since it's a user facing README, too much redactions would lead to a poor demonstration of the program (a web scraper). |
If we go forward with this, it seems like a state that should be put as a code fence attribute or in the trycmd API. I have considered adding a "force update" value that would write output independent of test status. That seems like it'd be a good fit with this. The problem I've had is |
This would be useful when dealing with non-reproducible commands (where the output may change frequently). In this case, checking against the output is unrealistic, but it is still useful to validate that e.g. all the examples in README run successfully.
Context: I am writing test cases for a web scraper.
The text was updated successfully, but these errors were encountered: