diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-02-14 18:56:19 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-02-14 18:57:18 +0200 |
commit | e5cff5b2233317cb7f8cb8465940c4e2f2aa1b9d (patch) | |
tree | ea40114682d71e925b1e434d954c4bcf479fda96 | |
parent | c38809e26b71c539584462c2d02b6cd2647ade5b (diff) |
tests/bytearray1: Add testcases for "in" operator.
-rw-r--r-- | tests/basics/bytearray1.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/basics/bytearray1.py b/tests/basics/bytearray1.py index 2e47f17bf..b59850026 100644 --- a/tests/basics/bytearray1.py +++ b/tests/basics/bytearray1.py @@ -31,3 +31,9 @@ print(bytearray() == bytearray()) print(bytearray() == 1) # TODO: other comparisons + +# __contains__ +b = bytearray(b"\0foo\0") +print(b"foo" in b) +print(b"foo\x01" in b) +print(b"" in b) |