[Python-Dev] [Python-checkins] cpython: Issue #19330: Handle the no-docstrings case in tests (original) (raw)

Stefan Krah stefan-usenet at bytereef.org
Sat Oct 26 14:50:01 CEST 2013


nick.coghlan <python-checkins at python.org> wrote:

http://hg.python.org/cpython/rev/a9bbc2d0c1dc -HAVEDOCSTRINGS = (checkimpldetail(cpython=False) or - sys.platform == 'win32' or - sysconfig.getconfigvar('WITHDOCSTRINGS')) +# Rather than trying to enumerate all the cases where docstrings may be +# disabled, we just check for that directly + +def checkdocstrings(): + """Just used to check if docstrings are enabled""" + +HAVEDOCSTRINGS = (checkdocstrings.doc is not None)

requiresdocstrings = unittest.skipUnless(HAVEDOCSTRINGS,

I think that does not detect --without-doc-strings (i.e. the C docstrings are empty).

Stefan Krah



More information about the Python-Dev mailing list