AI engineering glossary · Python advanced

What is pytest?

pytest: A popular Python testing framework that finds functions named test_* , runs them, and reports failures with detailed output. It uses plain assert statements and offers fixtures, parametrisation and plugins.

Level: beginnerTopic: Python advanced

pytest: an example

Saving def test_total(): assert total([1, 2]) == 3 in test_calc.py and running pytest executes it.

Related terms

More Python advanced terms

Where you learn it

pytest is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.