Preparation#

This session is concerned testing and error handling. Most economist have never heard about testing code and some think they don’t need it. However, if done right, testing can make you vastly more productive and at the same time make your research more reliable.

Moreover, you will see that so far we already did almost all the work we needed for testing (creating test inputs, calculating expected results) without getting and of the benefits. This will change now!

Testing screencasts#

The testing screencasts use data management examples. However, we will see in the exercises that testing is also useful for all other code and writing tests becomes even simple in other areas.

Error handling screencasts#

There is also a detailed worked example that shows you how to structure error handling in a larger module.

Optional testing screencasts#