Title: gh-109418: Fix hypothesis strategy for b2a_roundtrip test by sobolevn · Pull Request #109419 · python/cpython · GitHub
Open Graph Title: gh-109418: Fix hypothesis strategy for b2a_roundtrip test by sobolevn · Pull Request #109419 · python/cpython
X Title: gh-109418: Fix hypothesis strategy for b2a_roundtrip test by sobolevn · Pull Request #109419 · python/cpython
Description: Good find, @colesbury! It is indeed limited by 45 bytes: cpython/Modules/binascii.c Line 6 in 3b9d10b ** each line encodes 45 bytes (except possibly the last) Reproduced locally with: @hypothesis.reproduce_failure('6.84.0', b'AXicY2RgYBwciIEBAA2TAC8=') ====================================================================== ERROR: test_b2a_roundtrip (test.test_binascii.MemoryviewBinASCIITest.test_b2a_roundtrip) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/sobolev/Desktop/cpython/Lib/test/test_binascii.py", line 233, in test_b2a_roundtrip binary=hypothesis.strategies.binary(), ^^^^^^^ File "/Users/sobolev/Desktop/cpython/.venv/lib/python3.13/site-packages/hypothesis/core.py", line 1285, in wrapped_test state.execute_once( File "/Users/sobolev/Desktop/cpython/.venv/lib/python3.13/site-packages/hypothesis/core.py", line 791, in execute_once result = self.test_runner(data, run) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/sobolev/Desktop/cpython/.venv/lib/python3.13/site-packages/hypothesis/executors.py", line 47, in default_new_style_executor return function(data) ^^^^^^^^^^^^^^ File "/Users/sobolev/Desktop/cpython/.venv/lib/python3.13/site-packages/hypothesis/core.py", line 787, in run return test(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/Users/sobolev/Desktop/cpython/Lib/test/test_binascii.py", line 238, in test_b2a_roundtrip converted = binascii.b2a_uu(self.type2test(binary), backtick=backtick) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ binascii.Error: At most 45 bytes at once ---------------------------------------------------------------------- Ran 85 tests in 1.902s FAILED (errors=4, skipped=1) test test_binascii failed test_binascii failed (4 errors) Issue: gh-109418
Open Graph Description: Good find, @colesbury! It is indeed limited by 45 bytes: cpython/Modules/binascii.c Line 6 in 3b9d10b *...
X Description: Good find, @colesbury! It is indeed limited by 45 bytes: cpython/Modules/binascii.c Line 6 in 3b9d10b *...
Opengraph URL: https://github.com/python/cpython/pull/109419
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:31c35612-8fee-6dd4-cf3f-b9f2e64daeb9 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C660:2080FA:D1ADD7:1226824:6A53A97E |
| html-safe-nonce | 024676d75c60228166e22531e45f26f022dc490ff59613925e64e409b2bbc8b0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjYwOjIwODBGQTpEMUFERDc6MTIyNjgyNDo2QTUzQTk3RSIsInZpc2l0b3JfaWQiOiIzMTI5NjAyMDYxNzM5NzMxMzI2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1a0a322ffb9569bc71dfe93fae91a84aa1524314f283f76bea7e2f160e123a48 |
| hovercard-subject-tag | pull_request:1516284021 |
| 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/109419/files |
| twitter:image | https://avatars.githubusercontent.com/u/4660275?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4660275?s=400&v=4 |
| og:image:alt | Good find, @colesbury! It is indeed limited by 45 bytes: cpython/Modules/binascii.c Line 6 in 3b9d10b *... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width