summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMark Dickinson <mdickinson@enthought.com>2011-03-27 15:25:40 (GMT)
committerMark Dickinson <mdickinson@enthought.com>2011-03-27 15:25:40 (GMT)
commit92b60d55d9115af9661618d7d24da929f181be68 (patch)
tree16326265d34fcff48260bdb26cf403d97f0f6951 /Lib/test
parentccd2283c6fa83a7759a84605810e28713e9f1755 (diff)
downloadcpython-92b60d55d9115af9661618d7d24da929f181be68.zip
cpython-92b60d55d9115af9661618d7d24da929f181be68.tar.gz
cpython-92b60d55d9115af9661618d7d24da929f181be68.tar.bz2
Issue #9696: Fix exception incorrectly raised by xdrlib.Packer.pack_int when trying to pack a negative (in-range) integer.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_xdrlib.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_xdrlib.py b/Lib/test/test_xdrlib.py
index 073448c..6004c9f 100644
--- a/Lib/test/test_xdrlib.py
+++ b/Lib/test/test_xdrlib.py
@@ -12,6 +12,7 @@ class XDRTest(unittest.TestCase):
a = [b'what', b'is', b'hapnin', b'doctor']
p.pack_int(42)
+ p.pack_int(-17)
p.pack_uint(9)
p.pack_bool(True)
p.pack_bool(False)
@@ -29,6 +30,7 @@ class XDRTest(unittest.TestCase):
self.assertEqual(up.get_position(), 0)
self.assertEqual(up.unpack_int(), 42)
+ self.assertEqual(up.unpack_int(), -17)
self.assertEqual(up.unpack_uint(), 9)
self.assertTrue(up.unpack_bool() is True)