On Sun, 27 Mar 2022 00:48:04 -
"Itay Yeshaya" wrote:
> When running unittest with the -v flag, if a test has errors, and has a
> docstring, the test name is shown on one line, and the docstring is shown on
> the next line with the `ERROR` word.
> For example:
>
> ./python.exe -m unittest -v
On Sun, Mar 27, 2022 at 2:50 PM Guido van Rossum wrote:
> Hopefully it only prints the first line of the docstring?
>
Indeed, it's just the first line (traditionally a one line summary per
style).
https://github.com/python/cpython/blob/f6b3a07b7df60dc04d0260169ffef6e9796a2124/Lib/unittest/runne
Hopefully it only prints the first line of the docstring?
On Sun, Mar 27, 2022 at 2:42 PM Gregory P. Smith wrote:
> For many of us, this isn't a nuisance. It is a desirable feature.
>
> test_xxx functions and methods typically don't have docstrings at all as
> the majority of tests tend to be co
For many of us, this isn't a nuisance. It is a desirable feature.
test_xxx functions and methods typically don't have docstrings at all as
the majority of tests tend to be concise and obvious with the function name
itself describes what its purpose is. When we added printing the
docstring, it was
On Mar 26, 2022, at 17:48, Itay Yeshaya wrote:
>
> When running unittest with the -v flag, if a test has errors, and has a
> docstring, the test name is shown on one line, and the docstring is shown on
> the next line with the `ERROR` word.
This has been a long-standing nuisance, but I’m like
> On Mar 27, 2022, at 11:20 AM, Eric V. Smith wrote:
>
>
> On 3/27/2022 10:51 AM, Jelle Zijlstra wrote:
>>
>>
>> El sáb, 26 mar 2022 a las 17:51, Itay Yeshaya ()
>> escribió:
>>>
>>> Any thoughts on the mentioned solutions?
>>
>> This is a bit more out there, but can anyone explain why we
I recall actually really liking the docstring. I think there are situations
where the test name just can't be sufficiently explanatory. IIRC in the
past we didn't print the docstring at all and it felt right when it was
added.
ATM I'm not using unittest for anything so I don't have a strong opinio
On 3/27/2022 10:51 AM, Jelle Zijlstra wrote:
El sáb, 26 mar 2022 a las 17:51, Itay Yeshaya
() escribió:
Any thoughts on the mentioned solutions?
This is a bit more out there, but can anyone explain why we show the
docstring at all? As far as I can tell it causes a bunch of confusion
El sáb, 26 mar 2022 a las 17:51, Itay Yeshaya ()
escribió:
>
> Any thoughts on the mentioned solutions?
>
This is a bit more out there, but can anyone explain why we show the
docstring at all? As far as I can tell it causes a bunch of confusion and
helps little. If there's a failing test, I want