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

Method test_stripid

Lib/test/test_pydoc/test_pydoc.py:541–552  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

539 self.assertEqual(expected, result)
540
541 def test_stripid(self):
542 # test with strings, other implementations might have different repr()
543 stripid = pydoc.stripid
544 # strip the id
545 self.assertEqual(stripid('<function stripid at 0x88dcee4>'),
546 '<function stripid>')
547 self.assertEqual(stripid('<function stripid at 0x01F65390>'),
548 '<function stripid>')
549 # nothing to strip, return the same text
550 self.assertEqual(stripid('42'), '42')
551 self.assertEqual(stripid("<type 'exceptions.Exception'>"),
552 "<type 'exceptions.Exception'>")
553
554 def test_builtin_with_more_than_four_children(self):
555 """Tests help on builtin object which have more than four child classes.

Callers

nothing calls this directly

Calls 2

stripidFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected