pytest latest version for python 3.7 code example
Example 1: install pytest
pip install pytest
Example 2: pytest
# content of test_sample.py
def inc(x):
return x + 1
def test_answer():
assert inc(3) == 5
pip install pytest
# content of test_sample.py
def inc(x):
return x + 1
def test_answer():
assert inc(3) == 5