[issue32299] unittest.mock.patch.dict.__enter__ should return the dict

2019-05-28 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

@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!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32299] unittest.mock.patch.dict.__enter__ should return the dict

2019-05-28 Thread Cheryl Sabella


Cheryl Sabella  added the comment:


New changeset 04530812e90e45a37ed84e83505d63db7edc1262 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


--
nosy: +cheryl.sabella

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32299] unittest.mock.patch.dict.__enter__ should return the dict

2019-04-12 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +xtreak
versions: +Python 3.8 -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32299] unittest.mock.patch.dict.__enter__ should return the dict

2018-12-10 Thread Mario Corchero


Change by Mario Corchero :


--
pull_requests: +10296

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32299] unittest.mock.patch.dict.__enter__ should return the dict

2018-01-23 Thread Michael Foord

Michael Foord  added the comment:

This seems like a reasonable feature request.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32299] unittest.mock.patch.dict.__enter__ should return the dict

2018-01-23 Thread Berker Peksag

Change by Berker Peksag :


--
nosy: +michael.foord, rbcollins
versions:  -Python 3.6, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32299] unittest.mock.patch.dict.__enter__ should return the dict

2017-12-13 Thread Vadim Tsander

Change by Vadim Tsander :


--
keywords: +patch
pull_requests: +4726
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32299] unittest.mock.patch.dict.__enter__ should return the dict

2017-12-12 Thread Allen Li

Change by Allen Li :


--
type:  -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32299] unittest.mock.patch.dict.__enter__ should return the dict

2017-12-12 Thread Allen Li

New submission from Allen Li :

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'

--
components: Library (Lib)
messages: 308188
nosy: Allen Li
priority: normal
severity: normal
status: open
title: unittest.mock.patch.dict.__enter__ should return the dict
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com