[Python-Dev] How far to go with user-friendliness

Alexander xr.lists at gmail.com
Fri Jul 17 01:35:53 CEST 2015


> By the way, I've also been bitten by this several times, so I
> appreciate the desire to at least warn users (or raise an exception, or
> whatever).

It is not an intention to make tests more robust. It is the
implementation, which is questionable at least. I actually still hope
that the whole thing is a joke.

I do not want to read mistyped code from other developers and try to
guess whether it will work properly or not.



On Fri, Jul 17, 2015 at 11:18 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> On Wed, 15 Jul 2015 07:40:57 +1200
> Robert Collins <robertc at robertcollins.net> wrote:
>
>> On 15 July 2015 at 07:39, Paul Moore <p.f.moore at gmail.com> wrote:
>> > On 14 July 2015 at 20:27, Robert Collins <robertc at robertcollins.net> wrote:
>>
>> >>> In effect, this patch is "reserving" all attributes starting with
>> >>> "assert" or "assret" as actual methods of the mock object, and not
>> >>> mocked attributes.
>> >>
>> >> Yes, and thats ugly. OTOH it caught hundreds of useless tests in
>> >> OpenStack when this got ported into mock 1.1.0.
>> >
>> > ... which I guess counts as strong evidence that this *is* a common
>> > typo, at least in certain contexts.
>>
>> For clarity: None of the caught failures were assret as far as I know.
>> They were things like assert_called_onec_with, or assert_called.
>
> By the way, I've also been bitten by this several times, so I
> appreciate the desire to at least warn users (or raise an exception, or
> whatever).
>
> Regards
>
> Antoine.
>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/xr.lists%40gmail.com


More information about the Python-Dev mailing list