Skip to content

Commit e5cff5b

Browse files
committed
tests/bytearray1: Add testcases for "in" operator.
1 parent c38809e commit e5cff5b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/basics/bytearray1.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@
3131
print(bytearray() == 1)
3232

3333
# TODO: other comparisons
34+
35+
# __contains__
36+
b = bytearray(b"\0foo\0")
37+
print(b"foo" in b)
38+
print(b"foo\x01" in b)
39+
print(b"" in b)

0 commit comments

Comments
 (0)