I have a question and hope, that anyone can help me. I am using pytest and set up some test functions at the moment. Here is an example:
def square(number):
return(number ** 2)
with pytest I am able to set up different testing functions like
def test_square_2():
assert(square(2) == 4)
def test_square_3():
assert(square(3) == 9)
Now my Question: Is there a way to set up a list of lists like
test_list = [[1,1],[2,4],[3,9],[4,16],[5,25]]
and set up a loop to test all the tuples in the list?
Best F