MCPcopy Index your code
hub / github.com/RustPython/RustPython / assertIsNotNone

Method assertIsNotNone

Lib/unittest/case.py:1328–1332  ·  view source on GitHub ↗

Included for symmetry with assertIsNone.

(self, obj, msg=None)

Source from the content-addressed store, hash-verified

1326 self.fail(self._formatMessage(msg, standardMsg))
1327
1328 def assertIsNotNone(self, obj, msg=None):
1329 """Included for symmetry with assertIsNone."""
1330 if obj is None:
1331 standardMsg = 'unexpectedly None'
1332 self.fail(self._formatMessage(msg, standardMsg))
1333
1334 def assertIsInstance(self, obj, cls, msg=None):
1335 """Same as self.assertTrue(isinstance(obj, cls)), with a nicer

Calls 2

failMethod · 0.95
_formatMessageMethod · 0.95