Unittest Unittest is a testing framework in Python. 2 Ways to use Python Unittest assertRaises() in Python