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
Add capability to ignore arguments #228
Comments
Could be a good idea but I prefer to use just |
Sure! I can try to take a look. Where would you suggest? |
There are two steps:
rstest/rstest_macros/src/parse/mod.rs Line 644 in b32e182
is the struct where we can add a ignore flag and we can implement a is_ignore() method in ArgumentsInfo rstest/rstest_macros/src/parse/mod.rs Line 673 in b32e182
For parsing stage you can take a look to For rendering should be enough filter out the ignored arguments in rstest/rstest_macros/src/render/mod.rs Line 258 in b32e182
Maybe the hardest part is to find a way to write an end to end test.... I've no idea. Please remember to add a changelog line and document the new feature. |
Hey!
We have a macro that passes in a value to our tests, e.g.
Normally, we could just generate a fixture, but the problem is that construction of this init token is
unsafe
. This results in a lot of libraries/binaries with an unsafe fixture just for this:I was wondering if it was possible to support the ability to ignore certain parameters, something like this:
so that our macro could safely construct this token and pass that value in.
Thanks!
The text was updated successfully, but these errors were encountered: