This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Allen Li
Recipients Allen Li
Date 2017-12-13.07:08:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513148900.41.0.213398074469.issue32299@psf.upfronthosting.co.za>
In-reply-to
Content
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'
History
Date User Action Args
2017-12-13 07:08:20Allen Lisetrecipients: + Allen Li
2017-12-13 07:08:20Allen Lisetmessageid: <1513148900.41.0.213398074469.issue32299@psf.upfronthosting.co.za>
2017-12-13 07:08:20Allen Lilinkissue32299 messages
2017-12-13 07:08:19Allen Licreate