Title: bpo-32299: unittest.mock.patch.dict now returns patched dict when used as context manager by ts-taiye · Pull Request #4834 · python/cpython · GitHub
Open Graph Title: bpo-32299: unittest.mock.patch.dict now returns patched dict when used as context manager by ts-taiye · Pull Request #4834 · python/cpython
X Title: bpo-32299: unittest.mock.patch.dict now returns patched dict when used as context manager by ts-taiye · Pull Request #4834 · python/cpython
Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.
Open Graph Description: example: >>> from unittest.mock import patch >>> with patch.dict(a, a=2) as patched: ... print(patched) ... {'a': 2} >>> print(a) {'a': '1'} ...
X Description: example: >>> from unittest.mock import patch >>> with patch.dict(a, a=2) as patched: ... print(patched) ... {'a': 2} >>&...
Opengraph URL: https://github.com/python/cpython/pull/4834
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/commits(.:format) |
| route-controller | pull_requests |
| route-action | commits |
| fetch-nonce | v2:7d10145f-9ba1-9a29-99db-cd9c7d656817 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AC1A:11A717:3677AB:49B41D:6A4D9E32 |
| html-safe-nonce | 012ed81408ec0d1e315ca64905dc8a313845f27b9f619daca962371d05cc1e25 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzFBOjExQTcxNzozNjc3QUI6NDlCNDFEOjZBNEQ5RTMyIiwidmlzaXRvcl9pZCI6IjE1MTYyODU2NDM4MjY1MDMyMTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ff948857717284f0ae802e189a190a8c5f7b0d1de74259cbf65f1ab036af5abd |
| hovercard-subject-tag | pull_request:158048247 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/4834/commits |
| twitter:image | https://opengraph.githubassets.com/679cee9923c9bcf6387cd2c79482cf4ac6955ed557cb2cccc80f92473649556c/python/cpython/pull/4834 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/679cee9923c9bcf6387cd2c79482cf4ac6955ed557cb2cccc80f92473649556c/python/cpython/pull/4834 |
| og:image:alt | example: >>> from unittest.mock import patch >>> with patch.dict(a, a=2) as patched: ... print(patched) ... {'a': 2} >>> print(a) {'a': '1'} ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ts-taiye |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-cache |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7f13faa65cccc9b729d674da83335d5dcfdfd193 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width