Skip to content

Commit a8e6299

Browse files
committed
Add unit test for bytearray + string concat
1 parent ce86094 commit a8e6299

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/tests/bytearray_str_concat.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
assert(('abc' + bytearray('def')) == bytearray('abcdef'))
2+
assert((bytearray('abc') + 'def') == bytearray('abcdef'))
3+
try:
4+
u'abc' + bytearray('def')
5+
assert(False)
6+
except TypeError:
7+
pass
8+
9+
try:
10+
bytearray('abc') + u'def'
11+
assert(False)
12+
except TypeError:
13+
pass

0 commit comments

Comments
 (0)