summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/bytearray_add.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/bytearray_add.py')
-rw-r--r--tests/basics/bytearray_add.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/basics/bytearray_add.py b/tests/basics/bytearray_add.py
new file mode 100644
index 0000000000..21a386c6e7
--- /dev/null
+++ b/tests/basics/bytearray_add.py
@@ -0,0 +1,14 @@
+# test bytearray + bytearray
+
+b = bytearray(2)
+b[0] = 1
+b[1] = 2
+print(b + bytearray(2))
+
+# inplace add
+b += bytearray(3)
+print(b)
+
+# extend
+b.extend(bytearray(4))
+print(b)