summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/bytearray1.py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-08-10 11:49:23 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-08-10 16:22:57 +0300
commit5f930337bc352641699390ac1bf37ba64cd486d8 (patch)
tree1c30d257318eeda649bb8aff10d668950ff050c8 /tests/basics/bytearray1.py
parent7133d91773392f564b6a8d52f09c34cebc975ae3 (diff)
downloadmicropython-5f930337bc352641699390ac1bf37ba64cd486d8.tar.gz
micropython-5f930337bc352641699390ac1bf37ba64cd486d8.zip
objarray: Implement equality testing between arrays and other buffers.
Diffstat (limited to 'tests/basics/bytearray1.py')
-rw-r--r--tests/basics/bytearray1.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/basics/bytearray1.py b/tests/basics/bytearray1.py
index 02066cafc3..d8e669506b 100644
--- a/tests/basics/bytearray1.py
+++ b/tests/basics/bytearray1.py
@@ -17,3 +17,12 @@ print(s)
print(a[1:])
print(a[:-1])
print(a[2:3])
+
+# Comparisons
+print(bytearray([1]) == bytearray([1]))
+print(bytearray([1]) == bytearray([2]))
+print(bytearray([1]) == b"1")
+print(b"1" == bytearray([1]))
+print(bytearray() == bytearray())
+
+# TODO: other comparisons