Skip to content
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

Renaming fixture via argument attribute #108

Closed
la10736 opened this issue Mar 3, 2021 · 1 comment
Closed

Renaming fixture via argument attribute #108

la10736 opened this issue Mar 3, 2021 · 1 comment

Comments

@la10736
Copy link
Owner

la10736 commented Mar 3, 2021

In #107 we introduce fixture renaming. Here we implement the argument attribute version

#[rstest]
fn test_name(
    #[from(long_setup_name)]
    #[with("arg")]
    foo: FakeFoo) {
}

Pay attention: argument injection from compact version should refer to real fixture name and not to the shorter one: this because in case of reusing we would chose the short name for each test.

Question: what about of double rename?

First implementation can just raise error but we can admit a chain of renaming: this is a odd practice but the maybe is the implementation that make a sound syntax.

@la10736
Copy link
Owner Author

la10736 commented May 15, 2021

Ok... we cannot accept more than one: harder implementation and no real valid use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant