New submission from Chris Jerdonek <[email protected]>:
When invoking doctest.DocTestSuite's constructor with a module that has no
docstrings, doctest raises the following exception:
...
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/doctest.py",
line 2280, in DocTestSuite
raise ValueError(module, "has no tests")
ValueError: (<module '[snip]' from '[snip]'>, 'has no tests')
The error message is misleading because the exception is not raised for modules
that have docstrings but no doctests, only for modules that have no docstrings.
To be accurate, the message should be something like 'has no docstrings'.
----------
components: Library (Lib)
messages: 159022
nosy: cjerdonek
priority: normal
severity: normal
status: open
title: doctest.DocTestSuite error misleading when module has no docstrings
type: behavior
versions: Python 2.7, Python 3.2
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14649>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com