pytest: helps you write better programs
The
<span class="pre">pytest</span>
framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries.An example of a simple test:
# content of test_sample.py def inc(x): return x + 1 def test_answer(): assert inc(3) == 5