diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2011-02-24 19:40:09 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2011-02-24 19:40:09 (GMT) |
commit | 1ce92dc20d698ce46c3459da7801c76bb8518550 (patch) | |
tree | 26455f0ab85013e2095744fa179ae197500bd1aa /Lib/test/pickletester.py | |
parent | 6c3787cb70d8efa5f70939a5db300f56a724d698 (diff) | |
download | cpython-1ce92dc20d698ce46c3459da7801c76bb8518550.zip cpython-1ce92dc20d698ce46c3459da7801c76bb8518550.tar.gz cpython-1ce92dc20d698ce46c3459da7801c76bb8518550.tar.bz2 |
Issue #11286: Fixed unpickling of empty 2.x strings.
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r-- | Lib/test/pickletester.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 3534489..c2fe633 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -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 |