~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Lib/test/test_pydoc.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
288
288
            "white space was not stripped from module name "
289
289
            "or other error output mismatch")
290
290
 
 
291
    def test_stripid(self):
 
292
        # test with strings, other implementations might have different repr()
 
293
        stripid = pydoc.stripid
 
294
        # strip the id
 
295
        self.assertEqual(stripid('<function stripid at 0x88dcee4>'),
 
296
                         '<function stripid>')
 
297
        self.assertEqual(stripid('<function stripid at 0x01F65390>'),
 
298
                         '<function stripid>')
 
299
        # nothing to strip, return the same text
 
300
        self.assertEqual(stripid('42'), '42')
 
301
        self.assertEqual(stripid("<type 'exceptions.Exception'>"),
 
302
                         "<type 'exceptions.Exception'>")
 
303
 
291
304
 
292
305
class TestDescriptions(unittest.TestCase):
293
306