Feb-12-2024, 04:41 PM
You cannot call each add() function because you only have one add() function, the one function, the last add() function. If you want to call all the add() functions you need them to all have different names.
To run your test you could import the add function you want to test and name it add. In your test file:
To run your test you could import the add function you want to test and name it add. In your test file:
from add import add1 as addWhat you are trying to do is an odd use case, so don't be surprised that unittest is an awkward tool for your testing. I think unittest is an awkward tool period, and much prefer pytest.