Title: gh-92886: Fixing test that fails when running with optimizations (`-O`) in `test_imaplib.py` by jackh-ncl · Pull Request #93237 · python/cpython · GitHub
Open Graph Title: gh-92886: Fixing test that fails when running with optimizations (`-O`) in `test_imaplib.py` by jackh-ncl · Pull Request #93237 · python/cpython
X Title: gh-92886: Fixing test that fails when running with optimizations (`-O`) in `test_imaplib.py` by jackh-ncl · Pull Request #93237 · python/cpython
Description: #92886
Before:
$ ./python.exe -Om unittest test.test_imaplib
...
======================================================================
ERROR: test_dump_ur (test.test_imaplib.ThreadedNetworkedTests.test_dump_ur)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/.../dev/cpython/Lib/test/support/threading_helper.py", line 63, in decorator
return func(*args)
^^^^^^^^^^^
File "/Users/.../dev/cpython/Lib/test/test_imaplib.py", line 948, in test_dump_ur
with mock.patch.object(imap, '_mesg') as mock_mesg:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/.../dev/cpython/Lib/unittest/mock.py", line 1427, in __enter__
original, local = self.get_original()
^^^^^^^^^^^^^^^^^^^
File "/Users/.../dev/cpython/Lib/unittest/mock.py", line 1400, in get_original
raise AttributeError(
^^^^^^^^^^^^^^^^^^^^^
AttributeError:
Open Graph Description: #92886 Before: $ ./python.exe -Om unittest test.test_imaplib ... ====================================================================== ERROR: test_dump_ur (test.test_imaplib.ThreadedNetworkedTests...
X Description: #92886 Before: $ ./python.exe -Om unittest test.test_imaplib ... ====================================================================== ERROR: test_dump_ur (test.test_imaplib.ThreadedNetworkedTests...
Opengraph URL: https://github.com/python/cpython/pull/93237
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:4554cf05-6df7-e1d8-bf0a-9d01c22d359d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A56A:C9E9C:1315098:1AA8158:696A3418 |
| html-safe-nonce | 77f63c9a07cafee8362c412d0034e01a77c756cd8c3f878d496a68f522ac5ea0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTZBOkM5RTlDOjEzMTUwOTg6MUFBODE1ODo2OTZBMzQxOCIsInZpc2l0b3JfaWQiOiIzMDA1MjMyOTQ3MTM3MjI5ODQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9e10f524d33967a7e1ef2610e2c3bfd9ea4f55b0b93ba21ad7fb536f837268d0 |
| hovercard-subject-tag | pull_request:947653023 |
| 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/93237/files |
| twitter:image | https://avatars.githubusercontent.com/u/1750152?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1750152?s=400&v=4 |
| og:image:alt | #92886 Before: $ ./python.exe -Om unittest test.test_imaplib ... ====================================================================== ERROR: test_dump_ur (test.test_imaplib.ThreadedNetworkedTests... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7a9163cefd1ea4bd06f8eb7c082f43e4e53f626f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width