From 5f930337bc352641699390ac1bf37ba64cd486d8 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 10 Aug 2014 11:49:23 +0300 Subject: objarray: Implement equality testing between arrays and other buffers. --- tests/basics/bytearray1.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/basics/bytearray1.py b/tests/basics/bytearray1.py index 02066cafc..d8e669506 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 -- cgit v1.2.3