diff Lib/test/test_bytes.py @ 39643:3dd61ffd049e

Fix buglet in slice assignment of bytesobjects: assigning to b[3:0] ('stop' being before 'start') would actually assign to b[0:0] (or whatever 'stop' was)
author Thomas Wouters <thomas@python.org>
date Wed, 23 Aug 2006 23:20:29 +0000
parents 8d71f9a6c1c3
children 9548ca0e6560
line wrap: on
line diff
--- a/Lib/test/test_bytes.py	Wed Aug 23 18:13:39 2006 +0000
+++ b/Lib/test/test_bytes.py	Wed Aug 23 23:20:29 2006 +0000
@@ -235,6 +235,9 @@
 
         b[3:5] = [3, 4, 5, 6]
         self.assertEqual(b, bytes(range(10)))
+        
+        b[3:0] = [42, 42, 42]
+        self.assertEqual(b, bytes([0, 1, 2, 42, 42, 42, 3, 4, 5, 6, 7, 8, 9]))
 
     def test_setslice_trap(self):
         # This test verifies that we correctly handle assigning self