brianmay
changed the title
Wip/issue/issue30181 parse docstring using pydoc
bpo-30181 parse docstring using pydoc
brianmay
changed the title
bpo-30181 parse docstring using pydoc
bpo-30181: parse docstring using pydoc
| """ | ||
| Return the test case short description from a docstring. | ||
|
|
||
| Ths docstring is parsed by the standard `pydoc.splitdoc` function |
| @unittest.skipIf( | ||
| sys.flags.optimize >= 2, | ||
| "Docstrings are omitted with -O2 and above") | ||
| def testShortDescriptionWithSurroundingSpaceOneLineDocstring(self): |
| """ | ||
| Return the test case short description from a docstring. | ||
|
|
||
| Ths docstring is parsed by the standard `pydoc.splitdoc` function |
| doc = self._testMethodDoc | ||
| return doc and doc.split("\n")[0].strip() or None | ||
|
|
||
| """ Return a one-line description of the test, if any; otherwise None. """ |
| @unittest.skipIf( | ||
| sys.flags.optimize >= 2, | ||
| "Docstrings are omitted with -O2 and above") | ||
| def testShortDescriptionWithSurroundingSpaceOneLineDocstring(self): |
Closed
| .format(logging.getLevelName(self.level), self.logger.name)) | ||
|
|
||
|
|
||
| def short_description_from_docstring(text): |