From: Antoine Pitrou Date: Tue, 26 Jun 2012 21:04:48 +0000 (+0200) Subject: Issue #15079: make a test applicable to both C and Python versions of the pickle... X-Git-Tag: v3.3.0b2~388^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79035bd71f32cded043a8a7320290c0bd6c9c117;p=thirdparty%2FPython%2Fcpython.git Issue #15079: make a test applicable to both C and Python versions of the pickle module. Patch by Stefan Mihaila. --- diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index cab0523e351f..4d491b0173c3 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): diff --git a/Misc/ACKS b/Misc/ACKS index b5cead9bed7f..514e95dbec94 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -630,6 +630,7 @@ Mike Meyer Steven Miale Trent Mick Stan Mihai +Stefan Mihaila Aristotelis Mikropoulos Damien Miller Chad Miller