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

Allow interpolating arguments in data providers output #252

Open
Chemaclass opened this issue May 20, 2024 · 0 comments
Open

Allow interpolating arguments in data providers output #252

Chemaclass opened this issue May 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Chemaclass
Copy link
Member

Chemaclass commented May 20, 2024

When you use providers, the name of the test is printed next to the data used as argument of the provider. For example:

Screenshot 2024-05-20 at 13 22 10

This ⬆️ was done here: #203 (tests examples from fizzbuzz-bashunit)

💡 Idea

Allow interpolating these arguments in the names of the tests through some special syntax, for example ::1::, ::2::...

function test_returns_fizz_when_multiple_of_3_like_::1::_given() { ... }
function test_returns_fizz_when_multiple_of_5_like_::1::_given() { ... }
✓ Passed: Returns fizz when multiple of 3 like '3' given
✓ Passed: Returns fizz when multiple of 3 like '6' given
✓ Passed: Returns fizz when multiple of 5 like '5' given
✓ Passed: Returns fizz when multiple of 5 like '10' given
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant