Python Unittest Module
Unit testing framework — TestCase, assertEqual, assertRaises, TestSuite. This category documents 10 Python unittest module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: unittest.TestCase(), TestCase.assertEqual(), TestCase.assertTrue(), TestCase.assertFalse(), TestCase.assertRaises(), TestCase.assertIn(), TestCase.assertIsNone(), unittest.main(), unittest.TestLoader(), unittest.skip(). unittest.TestCase() base class for writing unit tests. Provides assertion methods and test runner support. TestCase.assertEqual() tests that first == second. Fails with msg if not equal. TestCase.assertTrue() tests that expr is True. TestCase.assertFalse() tests that expr is False. TestCase.assertRaises() tests that an exception is raised when callable is called. Unittest Module belongs to the Dev Tools group alongside Inspect Module, Pdb Module, Traceback Module, Timeit Module. You can also search across every category from the search page, browse the complete A–Z index, or try any example in the Python playground.