diff options
| author | Mark Dickinson <dickinsm@gmail.com> | 2009-09-06 10:03:31 (GMT) |
|---|---|---|
| committer | Mark Dickinson <dickinsm@gmail.com> | 2009-09-06 10:03:31 (GMT) |
| commit | c8a7c7c3b9c28dd2c0f9b81d807f8c7f60cb0924 (patch) | |
| tree | 151b9d039dc09c20d9b2b36b77d515c8a4970553 /Lib/test/test_bytes.py | |
| parent | 2596758cb42cb592f2e3c33ef77bc9b02c995510 (diff) | |
| download | cpython-c8a7c7c3b9c28dd2c0f9b81d807f8c7f60cb0924.zip cpython-c8a7c7c3b9c28dd2c0f9b81d807f8c7f60cb0924.tar.gz cpython-c8a7c7c3b9c28dd2c0f9b81d807f8c7f60cb0924.tar.bz2 | |
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.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index ee4804f..615c955 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()) |
