commit | 1ce92dc20d698ce46c3459da7801c76bb8518550 | [log] [tgz] |
---|---|---|
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | Thu Feb 24 19:40:09 2011 +0000 |
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | Thu Feb 24 19:40:09 2011 +0000 |
tree | 26455f0ab85013e2095744fa179ae197500bd1aa | |
parent | 6c3787cb70d8efa5f70939a5db300f56a724d698 [diff] [blame] |
Issue #11286: Fixed unpickling of empty 2.x strings.
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 @@ 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