AI engineering glossary · Python advanced
What is unit test?
Unit test: A small automated check that runs one piece of code, such as a function, in isolation and verifies its result against an expected value. Suites of them catch regressions when code changes.
Unit test: an example
assert add(2, 3) == 5 is a unit test checking that add returns 5.
Related terms
More Python advanced terms
Where you learn it
Unit test is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.