[issue21222] Mock create_autospec with name argument fails

2020-07-03 Thread Steve Dower
Steve Dower added the comment: New changeset 941117aaa32bf8b02c739ad848ac727292f75b05 by Steve Dower in branch '3.9': bpo-21222: Fix improperly merged change so that final hooks are called before types are cleared (GH-21304) https://github.com/python/cpython/commit/941117aaa32bf8b02c739ad848

[issue21222] Mock create_autospec with name argument fails

2020-07-03 Thread Steve Dower
Change by Steve Dower : -- nosy: +steve.dower nosy_count: 3.0 -> 4.0 pull_requests: +20455 pull_request: https://github.com/python/cpython/pull/21304 ___ Python tracker ___ ___

[issue21222] Mock create_autospec with name argument fails

2020-07-03 Thread Steve Dower
Change by Steve Dower : -- nosy: -steve.dower ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue21222] Mock create_autospec with name argument fails

2020-07-03 Thread Steve Dower
Change by Steve Dower : -- pull_requests: -20453 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue21222] Mock create_autospec with name argument fails

2020-07-03 Thread Steve Dower
Change by Steve Dower : -- nosy: +steve.dower nosy_count: 3.0 -> 4.0 pull_requests: +20453 pull_request: https://github.com/python/cpython/pull/21304 ___ Python tracker ___ ___

[issue21222] Mock create_autospec with name argument fails

2014-04-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset d471b0d38516 by Kushal Das in branch '3.4': Closes Issue 21222. http://hg.python.org/cpython/rev/d471b0d38516 -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed __

[issue21222] Mock create_autospec with name argument fails

2014-04-15 Thread Michael Foord
Michael Foord added the comment: Looks good to me, but please change qobj and add a NEWS entry. -- ___ Python tracker ___ ___ Python-b

[issue21222] Mock create_autospec with name argument fails

2014-04-15 Thread Kushal Das
Kushal Das added the comment: New patchset with changes made as suggested. -- Added file: http://bugs.python.org/file34881/issue21222_v2.patch ___ Python tracker ___

[issue21222] Mock create_autospec with name argument fails

2014-04-15 Thread Michael Foord
Michael Foord added the comment: You can use kwargs.pop instead of the two step fetch and delete. For the test, could you add an assert that the name is used. Can you add an extra underscore to the method name, to make it: test_create_autospec_with_name -- nosy: +michael.foord __

[issue21222] Mock create_autospec with name argument fails

2014-04-14 Thread Kushal Das
Kushal Das added the comment: Fix for the issue with test case. We are checking name in keyword arguments, if found replace _name with it and delete it from keyword arguments. -- keywords: +patch Added file: http://bugs.python.org/file34854/issue21222.patch

[issue21222] Mock create_autospec with name argument fails

2014-04-14 Thread Kushal Das
New submission from Kushal Das: >>> from unittest import mock >>> def b(): ... print("hello") ... >>> q = mock.create_autospec(b, name="a") Traceback (most recent call last): File "", line 1, in File "/home/kdas/code/python/cpython3/Lib/unittest/mock.py", line 2092, in create_autospec