[issue43400] Remove "Mock is very easy to use" from unittest.mock documentation

2021-03-04 Thread Eddie Peters


Change by Eddie Peters :


--
keywords: +patch
pull_requests: +23522
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24752

___
Python tracker 
<https://bugs.python.org/issue43400>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43400] Remove "Mock is very easy to use" from unittest.mock documentation

2021-03-04 Thread Eddie Peters

New submission from Eddie Peters :

The unittest.mock library is very useful and very powerful, but it is not "very 
easy to use." Docs are useful and important, or we wouldn't be here in a 
documentation issue.

I have watched several of the most experienced Python programmers I know 
struggle with various aspects of mock, including basic usage. I have sat with 
frustrated developers who have used mocking utilities in other languages but 
had little Python experience, and they were surprised by some mock behaviors 
and just couldn't get things "right" until they were helped by someone with all 
the tiny little healed-over cuts from lots of mock usage.

Again, mock is great, but maybe if I have these opinions, I should contribute 
to making mock more intuitive. That's true. For now, though, the documentation 
contains this little line in the opening paragraphs that is unnecessary and can 
only make new mock users feel bad about having trouble: "Mock is very easy to 
use and is designed for use with unittest."

I propose we remove the opinion "Mock is very easy to use" and change this line 
to "Mock is designed for use with unittest." The rest of the paragraph flows 
just fine without this:

"Mock is very easy to use and is designed for use with unittest. Mock is based 
on the ‘action -> assertion’ pattern instead of ‘record -> replay’ used by many 
mocking frameworks."

--
assignee: docs@python
components: Documentation
messages: 388102
nosy: docs@python, eppeters
priority: normal
severity: normal
status: open
title: Remove "Mock is very easy to use" from unittest.mock documentation
type: enhancement
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43400>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com