Lesson 5: Unit Testing Code


Example Code


  • Unittest is a built-in Python unit testing framework
  • Other popular unit testing frameworks for Python include pytest and nose
  • Object oriented programming is a way of encapsulating data and the functions that operate on that data together
  • Run a set of Unittest unit tests using python -m unittest followed by the script filename containing the tests that begins with test_

Creating a New Test


  • FIXME

Handling Errors


  • FIXME