[issue4899] doctest should support fixtures
Terry J. Reedy
report at bugs.python.org
Fri Jun 27 22:11:16 CEST 2014
Terry J. Reedy added the comment:
I am closing this for both the general reasons already given and the lack of a proposed api that could programmed, Hence there is no example code that would run and hence no specifics to approve. If someone wanted to pursue this, python-ideas would be a better place.
One of the general reasons given is that the example does not demonstrate a real need for the fixtures proposed. My take on the example code is this.
The input to TpedIterator is an iterable of lines. A list of lines will work as well an an open file. I would create a file of example lists and import the one needed for each docstring. For the example given.
def TpedIterator(lines):
'''Yield Marker for each line of lines.
>>> from biopython.sample_data import Tped
>>> for marker in TpedIterator(Tped):
... print(marker)
Marker rs10000543, 2 individuals
Marker rs10000929, 2 individuals
Marker rs10002472, 2 individuals
'''
----------
resolution: -> rejected
stage: test needed -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4899>
_______________________________________
More information about the Python-bugs-list
mailing list