Add a few tests for pydoc.

This is a modified version of a patch proposed by Humberto Diogenes
in the discussion of issue1883.

I will merge manually this change into the py3k branch: the tests must be adapted.
2 files changed