Skip to content

Glossary: Python Beyond the Basics

assert

Also written: AssertionError

A keyword that checks something is true; if it isn't, Python raises an AssertionError. Tests are built from `assert` lines.

Where the book teaches it

Related terms

pytestautomatic test