summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-06-26 21:05:27 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-06-26 21:05:27 (GMT)
commit9facaf4f6522a9c85af27903a4ab9f015554f61e (patch)
tree969d3b55f1ee868e7ebce51676eb28b1fdf6fde5
parent7fb30f034e375ebefd63e9b3d4c368b036981145 (diff)
parent79035bd71f32cded043a8a7320290c0bd6c9c117 (diff)
downloadcpython-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.py8
-rw-r--r--Misc/ACKS1
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):
diff --git a/Misc/ACKS b/Misc/ACKS
index c1c3cbd..6d8681e 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -695,6 +695,7 @@ Alexis Métaireau
Steven Miale
Trent Mick
Stan Mihai
+Stefan Mihaila
Aristotelis Mikropoulos
Chad Miller
Damien Miller