Title: PEP 417: adding mock module
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.3
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: michael.foord Nosy List: eric.araujo, giampaolo.rodola, michael.foord
Priority: normal Keywords:

Created on 2012-03-14 01:20 by michael.foord, last changed 2012-09-28 13:25 by michael.foord. This issue is now closed.

Messages (6)
msg155705 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2012-03-14 01:20
PEP 417: Including mock in the Standard Library


* Add mock with tests
* Cleanup mock code to remove Python 2 compatibility
* Add documentation

I'll close this issue when all the tasks are complete.
msg155820 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-03-15 00:09
I’ve seen some things to clean up in the code, like the fact that callable is back in 3.2+, or (I hate to point this) the ugly-according-to-PEP-8 klass instead of cls; I may read the code more carefully later if it helps.
msg155821 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2012-03-15 00:12
Feel free to suggest changes on this issue. 

_callable can probably go now I agree. 
cls is only suggested by PEP 8 for classmethods I believe, and off the top of my head I don't think mock has any of those.
msg155824 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-03-15 00:16
“If your public attribute name collides with a reserved keyword, append a single trailing underscore to your attribute name.  This is preferable to an abbreviation or corrupted spelling.  (However, notwithstanding this rule, 'cls' is the preferred spelling for any variable or argument which is known to be a class, especially the first argument to a class method.)”
msg156207 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2012-03-17 21:25
Interesting. As I have to keep the external version of mock in sync with unittest.mock, and I have more important things to do first (like the docs) it would be a gratuitous change for no benefit.

If you have any more substantive suggestions for code cleanup then feel free to suggest them.
msg171458 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2012-09-28 13:25
unittest.mock addition is complete.
Date User Action Args
2012-09-28 13:25:21michael.foordsetstatus: open -> closed
resolution: fixed
messages: + msg171458

stage: resolved
2012-03-17 21:25:28michael.foordsetmessages: + msg156207
2012-03-15 09:39:49giampaolo.rodolasetnosy: + giampaolo.rodola
2012-03-15 00:16:11eric.araujosetmessages: + msg155824
2012-03-15 00:12:11michael.foordsetmessages: + msg155821
2012-03-15 00:09:32eric.araujosetnosy: + eric.araujo
messages: + msg155820
2012-03-14 01:20:38michael.foordcreate