Pytest
pip install pytestdef myfunc(a):
return a+1# import the function
from .. import myfunc
def test_myfunc():
assert myfunc(1) == 2 # use assert to Running the pytest
- first it searches for tests in
testsfolder - run every function with assert and give output