I have set of many cases that I want to test on a single function.
Let's say:
@pytest.mark.unittest
def test_simple_test_id_odd():
numbers = [1, 2, 3, 4, 5, 6, 7, 8]
for number in numbers:
assert number % 2 == 0
When I run this it stops on the first number with the error. I want the test to go all over the numbers and check each one of them.
I don't want to write a test for each number, it does not make sense, it's too long.
How can I test all the numbers and raise error for every one of them that failed?