4. Testing in Python#
Attribution
This chapter reuses material from Learn Python for Engineers. The part on unit testing is written by Jialei Ding and Geet George. Find out more here.
This chapter picks up from last week on errors. Now the focus is on checking for errors by testing our code.
We will first have a look at the use of the Assert statement, and how different Errors are raised by Python. Then, we will look at more structured approaches to testing.