Conceptual
Login

Writing Unit Tests with pytest in Python

A pytest test is a plain function whose name starts with test_ and whose assert statements state what the code under test must produce, run from the command line so a failure names the assertion that broke. A learner afterwards can write a test for a function's expected result and read a passing or failing pytest run.