summaryrefslogtreecommitdiff
path: root/Lib/test/test_bytes.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-09-06 10:03:31 +0000
committerMark Dickinson <dickinsm@gmail.com>2009-09-06 10:03:31 +0000
commitc8a7c7c3b9c28dd2c0f9b81d807f8c7f60cb0924 (patch)
tree151b9d039dc09c20d9b2b36b77d515c8a4970553 /Lib/test/test_bytes.py
parent2596758cb42cb592f2e3c33ef77bc9b02c995510 (diff)
downloadcpython-git-c8a7c7c3b9c28dd2c0f9b81d807f8c7f60cb0924.tar.gz
Issue #6846: bytearray.pop was returning ints in the range [-128, 128)
instead of [0, 256). Thanks Hagen Fürstenau for the report and fix.
Diffstat (limited to 'Lib/test/test_bytes.py')
-rw-r--r--Lib/test/test_bytes.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py
index ee4804f202..615c955750 100644
--- a/Lib/test/test_bytes.py
+++ b/Lib/test/test_bytes.py
@@ -690,6 +690,8 @@ class ByteArrayTest(BaseBytesTest):
self.assertEqual(b.pop(-2), ord('r'))
self.assertRaises(IndexError, lambda: b.pop(10))
self.assertRaises(OverflowError, lambda: bytearray().pop())
+ # test for issue #6846
+ self.assertEqual(bytearray(b'\xff').pop(), 0xff)
def test_nosort(self):
self.assertRaises(AttributeError, lambda: bytearray().sort())