Marshal clean-up (SF patch #873224)

This commit is contained in:
Armin Rigo 2004-03-26 15:09:27 +00:00
parent 01c9f8c35f
commit 01ab279056
3 changed files with 66 additions and 70 deletions

View file

@ -175,6 +175,11 @@ class BugsTestCase(unittest.TestCase):
# Simple-minded check for SF 588452: Debug build crashes
marshal.dumps([128] * 1000)
def test_patch_873224(self):
self.assertRaises(Exception, marshal.loads, '0')
self.assertRaises(Exception, marshal.loads, 'f')
self.assertRaises(Exception, marshal.loads, marshal.dumps(5L)[:-1])
def test_main():
test_support.run_unittest(IntTestCase,
FloatTestCase,