summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2004-12-20 12:26:43 (GMT)
committerArmin Rigo <arigo@tunes.org>2004-12-20 12:26:43 (GMT)
commit21905e3e28c0b0c0e299adfc6048a7aee3cb8e33 (patch)
treeb94255f9e01c6d285fe28bd27f2b8e32662d19f2 /Lib
parented92affaaaa65bca5e3d5c8cee803854ea5928a5 (diff)
downloadcpython-21905e3e28c0b0c0e299adfc6048a7aee3cb8e33.zip
cpython-21905e3e28c0b0c0e299adfc6048a7aee3cb8e33.tar.gz
cpython-21905e3e28c0b0c0e299adfc6048a7aee3cb8e33.tar.bz2
Back-ported: marshal.dumps() with the new optional argument 'version' just
immediately segfaults, due to a typo!
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_marshal.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_marshal.py b/Lib/test/test_marshal.py
index eb07521..5c1a3f3 100644
--- a/Lib/test/test_marshal.py
+++ b/Lib/test/test_marshal.py
@@ -180,6 +180,11 @@ class BugsTestCase(unittest.TestCase):
self.assertRaises(Exception, marshal.loads, 'f')
self.assertRaises(Exception, marshal.loads, marshal.dumps(5L)[:-1])
+ def test_version_argument(self):
+ # Python 2.4.0 crashes for any call to marshal.dumps(x, y)
+ self.assertEquals(marshal.loads(marshal.dumps(5, 0)), 5)
+ self.assertEquals(marshal.loads(marshal.dumps(5, 1)), 5)
+
def test_main():
test_support.run_unittest(IntTestCase,
FloatTestCase,