New submission from Steve C <scire...@gmail.com>:

When running unit tests with the --verbose flag test descriptions are run using 
the first line of the test case's docstring. If the first character of the 
docstring is a newline, no description is printed.
Examples:
Current code expects docstrings to look like
'''It should return blah blah
This is a test...
'''
Where the description starts on the first line.

Some Python developers start the string on the next line. Example:
'''
It should return blah blah
This is a test...
'''

Lib.unittest.case.TestCase:shortDescription should first strip the docstrip of 
beginning and trailing whitespace.

----------
components: Library (Lib)
messages: 360666
nosy: Steve C2
priority: normal
severity: normal
status: open
title: unittest TestCase shortDescription does not strip whitespace
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39450>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to