You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of using for-loops in unit tests it would be better to use parametrised tests using @pytest.mark.parametrize. These decorators can also be stacked on top of each other in which case all combinations are performed (the equivalent of nested for-loops).
Using parametrised tests has the huge advantage that a failed test will tell which parametrisation exactly caused the issue, which would be lost in a for-loop.
Some of the unit tests have already been converted to parametrised tests. It would be good to extend that to all other tests that involve for-loops.
The text was updated successfully, but these errors were encountered:
Instead of using for-loops in unit tests it would be better to use parametrised tests using @pytest.mark.parametrize. These decorators can also be stacked on top of each other in which case all combinations are performed (the equivalent of nested for-loops).
Using parametrised tests has the huge advantage that a failed test will tell which parametrisation exactly caused the issue, which would be lost in a for-loop.
Some of the unit tests have already been converted to parametrised tests. It would be good to extend that to all other tests that involve for-loops.
The text was updated successfully, but these errors were encountered: