mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
tests/bytearray1: Add testcases for "in" operator.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user