
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2015-03-03 08:36 byzkrynicki, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue23568.patch | Håkan Lövdahl,2015-03-07 12:04 | patch and test | review | |
| Messages (4) | |||
|---|---|---|---|
| msg237112 -(view) | Author: Zygmunt Krynicki (zkrynicki) | Date: 2015-03-03 08:36 | |
Hey.I'm the upstream developer of padmehttps://github.com/zyga/padme -- the mostly transparent proxy class for Python. While working on unit tests for proxying numeric methods I realized that there are a few bugs in the mock library.The bug I'd like to report now is that __rdivmod__ cannot be mocked by MagicMock. This seems to be caused by the fact that it is listed as magic but not as numeric (for which right-hand-side variants are created).Note that it cannot be simply added to numeric as it doesn't have the augmented assignment variant (there is no __idivmod__).The bug is present in all versions of Python that come with unittest.mock (3.3, 3.4 and 3.5) and it is also present in the upstream/standalone version of mock | |||
| msg237441 -(view) | Author: Håkan Lövdahl (Håkan Lövdahl) | Date: 2015-03-07 12:04 | |
I wrote a small patch and a test for it. Tested it on Python 3.5 and it worked. | |||
| msg238111 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2015-03-14 23:57 | |
New changeset35a780a9a3b4 by Berker Peksag in branch '3.4':Issue#23568: Add rdivmod support to MagicMock() objects.https://hg.python.org/cpython/rev/35a780a9a3b4New changeset90f08e7fbdc3 by Berker Peksag in branch 'default':Issue#23568: Add rdivmod support to MagicMock() objects.https://hg.python.org/cpython/rev/90f08e7fbdc3 | |||
| msg238112 -(view) | Author: Berker Peksag (berker.peksag)*![]() | Date: 2015-03-15 00:02 | |
Thanks to both of you for the report and the patch. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:13 | admin | set | github: 67756 |
| 2015-03-15 00:02:16 | berker.peksag | set | status: open -> closed versions: + Python 3.4, Python 3.5, - Python 3.3 messages: +msg238112 resolution: fixed stage: resolved |
| 2015-03-14 23:57:44 | python-dev | set | nosy: +python-dev messages: +msg238111 |
| 2015-03-07 12:04:08 | Håkan Lövdahl | set | files: +issue23568.patch nosy: +Håkan Lövdahl messages: +msg237441 keywords: +patch |
| 2015-03-04 02:57:01 | berker.peksag | set | nosy: +berker.peksag |
| 2015-03-03 22:42:18 | ned.deily | set | nosy: +rbcollins,michael.foord |
| 2015-03-03 08:42:49 | zkrynicki | set | type: behavior versions: + Python 3.3, - Python 3.4, Python 3.5 |
| 2015-03-03 08:36:32 | zkrynicki | set | title: unittest.mock.MagicMock doesn't support __rdivmod__t -> unittest.mock.MagicMock doesn't support __rdivmod__ |
| 2015-03-03 08:36:25 | zkrynicki | create | |