Message 79477 - Python tracker
The doctest module should have support for fixtures (e.g. setUp and tearDown methods). It is very silly to be forced to always re-import all the modules needed in every function tested with doctest. For example, when you have to document functions that open files, you have to import StringIO or TempFile, and then create a file, while this could be done easily with a fixture.