MCPcopy Index your code
hub / github.com/python/cpython / assertIsNotNone

Method assertIsNotNone

Lib/unittest/case.py:1323–1327  ·  view source on GitHub ↗

Included for symmetry with assertIsNone.

(self, obj, msg=None)

Source from the content-addressed store, hash-verified

1321 self.fail(self._formatMessage(msg, standardMsg))
1322
1323 def assertIsNotNone(self, obj, msg=None):
1324 """Included for symmetry with assertIsNone."""
1325 if obj is None:
1326 standardMsg = 'unexpectedly None'
1327 self.fail(self._formatMessage(msg, standardMsg))
1328
1329 def assertIsInstance(self, obj, cls, msg=None):
1330 """Same as self.assertTrue(isinstance(obj, cls)), with a nicer

Calls 2

failMethod · 0.95
_formatMessageMethod · 0.95