diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-06-26 21:05:27 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-06-26 21:05:27 (GMT) |
commit | 9facaf4f6522a9c85af27903a4ab9f015554f61e (patch) | |
tree | 969d3b55f1ee868e7ebce51676eb28b1fdf6fde5 | |
parent | 7fb30f034e375ebefd63e9b3d4c368b036981145 (diff) | |
parent | 79035bd71f32cded043a8a7320290c0bd6c9c117 (diff) | |
download | cpython-9facaf4f6522a9c85af27903a4ab9f015554f61e.zip cpython-9facaf4f6522a9c85af27903a4ab9f015554f61e.tar.gz cpython-9facaf4f6522a9c85af27903a4ab9f015554f61e.tar.bz2 |
Issue #15079: make a test applicable to both C and Python versions of the pickle module.
Patch by Stefan Mihaila.
-rw-r--r-- | Lib/test/pickletester.py | 8 | ||||
-rw-r--r-- | Misc/ACKS | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 3686a62..fb04830 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -708,6 +708,11 @@ class AbstractPickleTests(unittest.TestCase): def test_getinitargs(self): pass + def test_pop_empty_stack(self): + # Test issue7455 + s = b'0' + self.assertRaises((pickle.UnpicklingError, IndexError), self.loads, s) + def test_metaclass(self): a = use_metaclass() for proto in protocols: @@ -1424,9 +1429,6 @@ class AbstractPickleModuleTests(unittest.TestCase): # Test issue4298 s = bytes([0x58, 0, 0, 0, 0x54]) self.assertRaises(EOFError, pickle.loads, s) - # Test issue7455 - s = b'0' - self.assertRaises(pickle.UnpicklingError, pickle.loads, s) class AbstractPersistentPicklerTests(unittest.TestCase): @@ -695,6 +695,7 @@ Alexis Métaireau Steven Miale Trent Mick Stan Mihai +Stefan Mihaila Aristotelis Mikropoulos Chad Miller Damien Miller |