Testing and Debugging

Autor: Ryan G. McClarren
Rok vydání: 2018
Předmět:
DOI: 10.1016/b978-0-12-812253-2.00007-8
Popis: When writing codes in Python, or any language, mistakes can happen and cause the code to behave in undesired ways. These mistakes, called bugs, need to be found by the programmer, and we discuss this process of debugging to remove these errors. As part of debugging we demonstrate the necessity of designing tests to assure that a code performs the required task. A key tool in the process of debugging is the assert statement, and we show how to use it to find bugs in a code. Additionally, the concept of error handling is shown as a way to handle unexpected behavior inside the code, and to correct errors when possible.
Databáze: OpenAIRE