Homework Session06

Finish up the exercises

Write a complete set of unit tests for your mailroom program.

  • You will likely find that it is really hard to test without refactoring.
  • This is Good!
  • If code is hard to test – it probably should be refactored.

Material to review for next week

Next week, we’ll get started on Object Oriented Methods. It’s a good idea to read up on it first – so we can dive right in:

[note that in py3 you don’t need to inherit from object]

Talk by Raymond Hettinger:

Video of talk: https://youtu.be/HTLu2DFOdTg

Slides: https://speakerdeck.com/pyconslides/pythons-class-development-toolkit-by-raymond-hettinger