[issue30181] Incorrect parsing of test case docstring

2017-04-27 Thread R. David Murray
R. David Murray added the comment: Considering that in the cpython test suite we avoid using docstrings in unittests because of this "feature" of unittest, I doubt anyone on the core team is going to be motivated to fix this :) That doesn't mean we won't accept a PR, but if we do we would

[issue30181] Incorrect parsing of test case docstring

2017-04-27 Thread Ben Finney
Ben Finney added the comment: > This is because unittest.TestCase method `shortDescription()` will only > return the first line of docstring Yes, that is the “docstring synopsis” I referred to. PEP 257 has a section specifically about how tools should parse a docstring:

[issue30181] Incorrect parsing of test case docstring

2017-04-26 Thread Louie Lu
Louie Lu added the comment: This is because unittest.TestCase method `shortDescription()` will only return the first line of docstring, writing at here*: """ The default implementation of this method returns the first line of the test method’s docstring, if available, or None. """ Not sure

[issue30181] Incorrect parsing of test case docstring

2017-04-26 Thread Brian May
Changes by Brian May : -- nosy: +brian ___ Python tracker ___ ___

[issue30181] Incorrect parsing of test case docstring

2017-04-26 Thread Ben Finney
New submission from Ben Finney: The docstring of a test case is not correctly parsed for display. The attached ‘test_foo.py’ module contains two test case functions. Both docstrings conform to PEP 257 : they have a single-line synopsis and some extra