TestCase.assertIsNone()
TestCase.assertIsNone() is a Python method in the Unittest Module category. Tests that obj is None. The syntax is TestCase.assertIsNone(obj, msg=None). Returns: None. A typical example: self.assertIsNone(get_optional()). A close sibling is unittest.TestCase(), which base class for writing unit tests. Provides assertion methods and test runner support. A close sibling is TestCase.assertEqual(), which tests that first == second. Fails with msg if not equal. A close sibling is TestCase.assertTrue(), which tests that expr is True. A close sibling is TestCase.assertFalse(), which tests that expr is False. More about this category: Unit testing framework — TestCase, assertEqual, assertRaises, TestSuite. Related Unittest Module entries: unittest.TestCase(), TestCase.assertEqual(), TestCase.assertTrue(), TestCase.assertFalse(), TestCase.assertRaises(), TestCase.assertIn(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try TestCase.assertIsNone() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.