mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #11286: Fixed unpickling of empty 2.x strings.
This commit is contained in:
parent
6c3787cb70
commit
1ce92dc20d
4 changed files with 12 additions and 13 deletions
|
@ -1094,6 +1094,10 @@ class AbstractPickleTests(unittest.TestCase):
|
|||
self.assertEqual(len(loaded), len(data))
|
||||
self.assertEqual(loaded, data)
|
||||
|
||||
def test_empty_bytestring(self):
|
||||
# issue 11286
|
||||
empty = self.loads(b'\x80\x03U\x00q\x00.', encoding='koi8-r')
|
||||
self.assertEqual(empty, '')
|
||||
|
||||
# Test classes for reduce_ex
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue