-
-
Notifications
You must be signed in to change notification settings - Fork 548
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
Use pytest
's fixtures to reduce repetition across tests
#4502
Comments
@agriyakhetarpal We can put this for hacktoberfest. |
tests/unit/test_parameters/test_process_parameter_data.py
file.tests/unit/test_parameters/test_process_parameter_data.py
file.
I added the labels – additionally, could you please link to some code examples (a few low-hanging fruits) where you've noticed that this is the case, so that it's easier for potential contributors to know what to start with? |
Hey would love to pick up this issue ! |
Sure @Aswinr24, feel free to work on this and also don't hesitate to let us know if you need help at any point :) |
Could You Please Review my PR and suggest if any changes are required |
tests/unit/test_parameters/test_process_parameter_data.py
file.pytest
's fixtures to reduce repetition across tests
Pytest offers various features, one of them being the use of fixtures. This helps us better manage the tests and setup preconditions. Using the
pytest.mark.parameterize
fixture helps us give multiple inputs to test functions.Learn more : https://docs.pytest.org/en/stable/how-to/parametrize.html.
We can take for example
inside a fixture and work up things accordingly.
The text was updated successfully, but these errors were encountered: