On 15 July 2015 at 10:05, Ethan Furman <et...@stoneleaf.us> wrote:
> On 07/14/2015 02:53 PM, Robert Collins wrote:
...
>>> I don't think unittest can protect its users from such things.
>>
>>
>> It can't, but there is a sliding scale of API usability, and we should
>> try to be up the good end of that :).
>
>
> I hope you're not suggesting that supporting misspellings, and thereby
> ruling out the proper use of an otherwise fine variable name, is at the good
> end of that scale?

I'm not supporting the misspelling thing - see my suggestion earlier
in this thread to move the mock assertions to standalone functions,
removing the bug in that area *entirely* and eventually removing the
check for method names starting with assert from mock entirely.

What I am doing is rejecting the argument that because we can't fix
every mis-use users might make, we therefore should not fix the cases
where we can fix it.

For clarity, I think we should:
 - remove the assret check, it is I think spurious.
 - add a set of functions to the mock module that should be used in
preference to Mock.assert*
 - mark the Mock.assert* functions as PendingDeprecation
 - in 3.6 move the PendingDeprecation to Deprecated
 - in 3.7 remove the Mock.assert* functions and the check for method
names beginning with assert entirely.

-Rob


-- 
Robert Collins <rbtcoll...@hp.com>
Distinguished Technologist
HP Converged Cloud
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to