bpo-40834: Fix truncate when sending str object with channel (GH-20555)

(cherry picked from commit 29c117202e)

Co-authored-by: An Long <aisk@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2020-06-13 05:44:38 -07:00 committed by GitHub
parent 166d7234b5
commit 94bb4b7db2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View file

@ -378,6 +378,9 @@ class ShareableTypeTests(unittest.TestCase):
self._assert_values(i.to_bytes(2, 'little', signed=True)
for i in range(-1, 258))
def test_strs(self):
self._assert_values(['hello world', '你好世界', ''])
def test_int(self):
self._assert_values(itertools.chain(range(-1, 258),
[sys.maxsize, -sys.maxsize - 1]))