Unit tests are automated tests, which test a small piece of code, usually a function or method. Python has the PyUnit API for unit testing. As NumPy users we can make use of the assert functions we saw in action before.