summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-06-26 21:04:48 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-06-26 21:04:48 (GMT)
commit79035bd71f32cded043a8a7320290c0bd6c9c117 (patch)
treecb31aa4e89b9f97487afabb953a2511dfc0c2bbc /Lib/test
parentb83719287d6be9fede9c7dc17ab8494f296a8f86 (diff)
downloadcpython-79035bd71f32cded043a8a7320290c0bd6c9c117.zip
cpython-79035bd71f32cded043a8a7320290c0bd6c9c117.tar.gz
cpython-79035bd71f32cded043a8a7320290c0bd6c9c117.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 cab0523..4d491b0 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -707,6 +707,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:
@@ -1383,9 +1388,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):