Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 417: adding mock module #58503

Closed
voidspace opened this issue Mar 14, 2012 · 6 comments
Closed

PEP 417: adding mock module #58503

voidspace opened this issue Mar 14, 2012 · 6 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@voidspace
Copy link
Contributor

BPO 14295
Nosy @giampaolo, @merwok, @voidspace

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/voidspace'
closed_at = <Date 2012-09-28.13:25:21.635>
created_at = <Date 2012-03-14.01:20:38.047>
labels = ['library']
title = 'PEP 417: adding mock module'
updated_at = <Date 2012-09-28.13:25:21.633>
user = 'https://github.com/voidspace'

bugs.python.org fields:

activity = <Date 2012-09-28.13:25:21.633>
actor = 'michael.foord'
assignee = 'michael.foord'
closed = True
closed_date = <Date 2012-09-28.13:25:21.635>
closer = 'michael.foord'
components = ['Library (Lib)']
creation = <Date 2012-03-14.01:20:38.047>
creator = 'michael.foord'
dependencies = []
files = []
hgrepos = []
issue_num = 14295
keywords = []
message_count = 6.0
messages = ['155705', '155820', '155821', '155824', '156207', '171458']
nosy_count = 3.0
nosy_names = ['giampaolo.rodola', 'eric.araujo', 'michael.foord']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue14295'
versions = ['Python 3.3']

@voidspace
Copy link
Contributor Author

PEP-417: Including mock in the Standard Library
http://www.python.org/dev/peps/pep-0417/

Tasks:

  • 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.

@voidspace voidspace self-assigned this Mar 14, 2012
@voidspace voidspace added the stdlib Python modules in the Lib dir label Mar 14, 2012
@merwok
Copy link
Member

merwok commented Mar 15, 2012

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.

@voidspace
Copy link
Contributor Author

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.

@merwok
Copy link
Member

merwok commented Mar 15, 2012

“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.)”

@voidspace
Copy link
Contributor Author

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.

@voidspace
Copy link
Contributor Author

unittest.mock addition is complete.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

2 participants