Skip to content

Glossary: Coding with AI Assistants

assert

Also written: assertion, AssertionError

A Python statement that checks something is true. Nothing happens if it is; if it isn't, the test fails and pytest shows what came back and what was expected.

Where the book teaches it

Related terms

Testpytestpytest.raises