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

Method test_formatMsg

Lib/test/test_unittest/test_assertions.py:170–178  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

168 self.assertTrue(unittest.TestCase.longMessage)
169
170 def test_formatMsg(self):
171 self.assertEqual(self.testableFalse._formatMessage(None, "foo"), "foo")
172 self.assertEqual(self.testableFalse._formatMessage("foo", "bar"), "foo")
173
174 self.assertEqual(self.testableTrue._formatMessage(None, "foo"), "foo")
175 self.assertEqual(self.testableTrue._formatMessage("foo", "bar"), "bar : foo")
176
177 # This blows up if _formatMessage uses string concatenation
178 self.testableTrue._formatMessage(object(), 'foo')
179
180 def test_formatMessage_unicode_error(self):
181 one = ''.join(chr(i) for i in range(255))

Callers

nothing calls this directly

Calls 2

_formatMessageMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected