summaryrefslogtreecommitdiffstats
path: root/Lib/test
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 /Lib/test
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.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/pickletester.py8
1 files changed, 5 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):