© J. Burton Browning and Marty Alchin 2019
J. Burton Browning and Marty AlchinPro Python 3https://doi.org/10.1007/978-1-4842-4385-5_9

9. Testing

J. Burton Browning1  and Marty Alchin2
(1)
Oak Island, NC, USA
(2)
Agoura Hills, CA, USA
 

Writing an application is only part of the process; it’s also important to check that all of the code works as it should. You can visually inspect the code, but it’s better to execute it in a variety of situations that may arise in the real world to make sure it behaves properly. This process is called unit testing, because the goal is to test the smallest available units of execution.

Typically, the smallest unit is a function or method, many of which combine to form a full application. By breaking it down into individual ...

Get Pro Python 3: Features and Tools for Professional Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.