From d30e019459d1ef026b95739716d2d3a7d791575e Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 21 Jan 2014 23:47:09 +0200 Subject: [PATCH] Add bytearray basic tests. --- tests/basics/bytearray1.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/basics/bytearray1.py diff --git a/tests/basics/bytearray1.py b/tests/basics/bytearray1.py new file mode 100644 index 0000000000..3658713fa8 --- /dev/null +++ b/tests/basics/bytearray1.py @@ -0,0 +1,12 @@ +a = bytearray([1, 2, 200]) +print(a[0], a[2]) +print(a[-1]) +a[2] = 255 +print(a[-1]) +a.append(10) +print(len(a)) + +s = 0 +for i in a: + s += i +print(s)