[Python-Dev] doctest and pickle (original) (raw)

Serhiy Storchaka storchaka at gmail.com
Sat Jun 8 12:09:21 CEST 2013


08.06.13 11:47, Ethan Furman написав(ла):

In this case it is better to exclude a code example from doctests or add auxiliary code (i.e. as Steven suggested) to pass the doctest. Are you saying there is something wrong about what I have in place now? I would think that one line showing something you might actually do (importing an Enum from another module) is better than two lines showing esoteric workarounds (importing main and setting an attribute on it).

test.test_enum is not here. The reader should look into the external test module (which may not be supplied along with the module and documentation) to understand the example. Or rely on assumptions.

Is it possible to add "invisible" code which doesn't displayed in the resulting documentation, but taken into account by doctest?



More information about the Python-Dev mailing list