@@ -66,6 +66,7 @@ def test_fromobject(self):
6666 # Test PyByteArray_FromObject()
6767 fromobject = _testlimitedcapi .bytearray_fromobject
6868
69+ self .assertEqual (fromobject (b'' ), bytearray (b'' ))
6970 self .assertEqual (fromobject (b'abc' ), bytearray (b'abc' ))
7071 self .assertEqual (fromobject (bytearray (b'abc' )), bytearray (b'abc' ))
7172 self .assertEqual (fromobject (ByteArraySubclass (b'abc' )), bytearray (b'abc' ))
@@ -115,6 +116,7 @@ def test_concat(self):
115116 self .assertEqual (concat (b'abc' , bytearray (b'def' )), bytearray (b'abcdef' ))
116117 self .assertEqual (concat (bytearray (b'abc' ), b'' ), bytearray (b'abc' ))
117118 self .assertEqual (concat (b'' , bytearray (b'def' )), bytearray (b'def' ))
119+ self .assertEqual (concat (bytearray (b'' ), bytearray (b'' )), bytearray (b'' ))
118120 self .assertEqual (concat (memoryview (b'xabcy' )[1 :4 ], b'def' ),
119121 bytearray (b'abcdef' ))
120122 self .assertEqual (concat (b'abc' , memoryview (b'xdefy' )[1 :4 ]),
@@ -150,6 +152,8 @@ def test_resize(self):
150152 self .assertEqual (resize (ba , 0 ), 0 )
151153 self .assertEqual (ba , bytearray ())
152154
155+ self .assertEqual (resize (bytearray (b'' ), 0 ), 0 )
156+
153157 ba = ByteArraySubclass (b'abcdef' )
154158 self .assertEqual (resize (ba , 3 ), 0 )
155159 self .assertEqual (ba , bytearray (b'abc' ))
0 commit comments