This week you have learned two important new concepts: unit testing and exceptions handling. In today's assignment we will revisit old code in order to properly test it and make it more robust.
test_*.py
file per module). The test suite must contain unit tests for each function you programmed. While doing so, you might find it very useful to refactor your code following the good practices: write small functions with a task clearly defined, which you can test for. If you can't test it, the function is possibly not written the right way: either too broad, or not useful enough.Back to the table of contents