
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2017-12-13 07:08 byAllen Li, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 4834 | closed | Vadim Tsander,2017-12-13 09:59 | |
| PR 11062 | merged | mariocj89,2018-12-10 09:18 | |
| Messages (4) | |||
|---|---|---|---|
| msg308188 -(view) | Author: Allen Li (Allen Li) | Date: 2017-12-13 07:08 | |
mock.patch.dict.__enter__ should return the patched dict/mapping object.Currently it returns nothing (None).This would make setting up fixtures more convenient: with mock.patch.dict(some.thing): some.thing['foo'] = 'bar' with mock.patch.dict(some.thing) as x: x['foo'] = 'bar' | |||
| msg310489 -(view) | Author: Michael Foord (michael.foord)*![]() | Date: 2018-01-23 09:35 | |
This seems like a reasonable feature request. | |||
| msg343772 -(view) | Author: Cheryl Sabella (cheryl.sabella)*![]() | Date: 2019-05-28 12:53 | |
New changeset04530812e90e45a37ed84e83505d63db7edc1262 by Cheryl Sabella (Mario Corchero) in branch 'master':bpo-32299: Return patched dict when using patch.dict as a context manager (GH-11062)https://github.com/python/cpython/commit/04530812e90e45a37ed84e83505d63db7edc1262 | |||
| msg343775 -(view) | Author: Cheryl Sabella (cheryl.sabella)*![]() | Date: 2019-05-28 12:59 | |
@Allen Li, thank you for the report. And thank you, @Vadim Tsander for the original pull request and @mariocj89 for reviving this. Also, thank you @eric.araujo for the review and approval. This has been merged! | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:55 | admin | set | github: 76480 |
| 2019-05-28 12:59:19 | cheryl.sabella | set | status: open -> closed resolution: fixed messages: +msg343775 stage: patch review -> resolved |
| 2019-05-28 12:53:35 | cheryl.sabella | set | nosy: +cheryl.sabella messages: +msg343772 |
| 2019-04-12 23:28:31 | cheryl.sabella | set | nosy: +xtreak versions: + Python 3.8, - Python 3.7 |
| 2018-12-10 09:18:19 | mariocj89 | set | pull_requests: +pull_request10296 |
| 2018-01-23 09:35:32 | michael.foord | set | messages: +msg310489 |
| 2018-01-23 08:09:40 | berker.peksag | set | nosy: +rbcollins,michael.foord versions: - Python 3.6, Python 3.8 |
| 2017-12-13 09:59:16 | Vadim Tsander | set | keywords: +patch stage: patch review pull_requests: +pull_request4726 |
| 2017-12-13 07:08:31 | Allen Li | set | type: enhancement |
| 2017-12-13 07:08:20 | Allen Li | create | |