From 412c95a4858e3020779baf0906b8c90eaa21108c Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Tue, 16 Feb 2010 23:31:04 +0000 Subject: Merged revisions 78207 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78207 | ezio.melotti | 2010-02-17 01:26:09 +0200 (Wed, 17 Feb 2010) | 1 line #7930: fix stripid ........ --- Lib/test/test_pydoc.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Lib/test/test_pydoc.py') diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py index 3bcd592bac..5d99e43203 100644 --- a/Lib/test/test_pydoc.py +++ b/Lib/test/test_pydoc.py @@ -306,6 +306,19 @@ class PyDocDocTest(unittest.TestCase): expected = missing_pattern % missing_module.strip() self.assertEqual(expected, result) + def test_stripid(self): + # test with strings, other implementations might have different repr() + stripid = pydoc.stripid + # strip the id + self.assertEqual(stripid(''), + '') + self.assertEqual(stripid(''), + '') + # nothing to strip, return the same text + self.assertEqual(stripid('42'), '42') + self.assertEqual(stripid(""), + "") + class TestDescriptions(unittest.TestCase): -- cgit v1.2.1