[issue29686] Unittest - Return empty string instead of None object on shortDescription()

2017-03-07 Thread Vinícius Dantas
Vinícius Dantas added the comment: In the point of view of a tester, if it's an error, they will know right away it is a test case problem, not an assert problem. That makes debugging easier. It is also important to note that, if it's an AssertionError, we may add a message. While, if it is an

[issue29686] Unittest - Return empty string instead of None object on shortDescription()

2017-03-01 Thread R. David Murray
R. David Murray added the comment: We don't make breaking changes unless there is strong motivation, which is lacking here. -- nosy: +r.david.murray ___ Python tracker

[issue29686] Unittest - Return empty string instead of None object on shortDescription()

2017-03-01 Thread Vinícius Dantas
Vinícius Dantas added the comment: If it is tagged for future releases, whoever choose to update their Python version should expect code breaking and API changes, shouldn't them? I don't see code breaking as an issue against this request. On 1 March 2017 at 14:33, Raymond Hettinger

[issue29686] Unittest - Return empty string instead of None object on shortDescription()

2017-03-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: It's too late to change this API. As Serhiy says, it risks breaking code that is currently running and correct. Note the the __doc__ on functions is set to None when there is no docstring. For better or worse, returning None is common in the Python

[issue29686] Unittest - Return empty string instead of None object on shortDescription()

2017-03-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This can break a code that checks whether shortDescription() is None. If you an empty string rather than None, just use the expression `shortDescription() or ''`. -- nosy: +serhiy.storchaka ___ Python tracker

[issue29686] Unittest - Return empty string instead of None object on shortDescription()

2017-03-01 Thread Vinícius Dantas
Changes by Vinícius Dantas : -- pull_requests: +319 ___ Python tracker ___ ___

[issue29686] Unittest - Return empty string instead of None object on shortDescription()

2017-03-01 Thread Vinícius Dantas
New submission from Vinícius Dantas: I have been browsing around the unittest standard library, and I realized that TestCase's shortDescription() method at lib/pythonX.X/unittest/case.py returns None when the there is no docstring on the test that is running. As shortDescription() should