We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I wrote integration tests that run queries in database and I want to isolate this test's queries.
Case name looks good option for me to achieve isolation and visibility, now I duplicate case name in parameter:
#[rstest] #[case::standard("standard", "")] #[case::concurrent("concurrent", " CONCURRENTLY")] fn test(#[case] case: &str, #[case] suffix: &str) { // CREATE TABLE test_{case} (...) }
In general it works fine except situation when cases copy-pasted a lot and it require both places fix to avoid isolation issues.
Option when I can use case name as case parameter looks good improvement for my workflow:
#[rstest] #[case::standard("")] #[case::concurrent(" CONCURRENTLY")] fn test(#[case_name] case: &str, #[case] suffix: &str) { // CREATE TABLE test_{case} (...) }
I wonder if rstest has something similar or you can suggest how it can be implemented best way?
The text was updated successfully, but these errors were encountered:
You can use something like in #177 . Anyway I would find some time to implement the #[context] attribute.
#[context]
Sorry, something went wrong.
This works perfectly, thanks.
No branches or pull requests
I wrote integration tests that run queries in database and I want to isolate this test's queries.
Case name looks good option for me to achieve isolation and visibility, now I duplicate case name in parameter:
In general it works fine except situation when cases copy-pasted a lot and it require both places fix to avoid isolation issues.
Option when I can use case name as case parameter looks good improvement for my workflow:
I wonder if rstest has something similar or you can suggest how it can be implemented best way?
The text was updated successfully, but these errors were encountered: