diff options
author | Damien George <damien.p.george@gmail.com> | 2014-12-24 20:28:30 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-12-24 20:28:30 +0000 |
commit | c55a4d82cf03d22933028bd9db4031ef349fdc1f (patch) | |
tree | 82ee56795109357a08c34b5a210608034eedc1f6 /tests/basics/bytes_find.py | |
parent | 7fdb8d78a47e7d78c93aba3f58cc83b92d0e1729 (diff) |
py: Make bytes objs work with more str methods; add tests.
Diffstat (limited to 'tests/basics/bytes_find.py')
-rw-r--r-- | tests/basics/bytes_find.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/basics/bytes_find.py b/tests/basics/bytes_find.py new file mode 100644 index 000000000..434669a90 --- /dev/null +++ b/tests/basics/bytes_find.py @@ -0,0 +1,23 @@ +print(b"hello world".find(b"ll")) +print(b"hello world".find(b"ll", None)) +print(b"hello world".find(b"ll", 1)) +print(b"hello world".find(b"ll", 1, None)) +print(b"hello world".find(b"ll", None, None)) +print(b"hello world".find(b"ll", 1, -1)) +print(b"hello world".find(b"ll", 1, 1)) +print(b"hello world".find(b"ll", 1, 2)) +print(b"hello world".find(b"ll", 1, 3)) +print(b"hello world".find(b"ll", 1, 4)) +print(b"hello world".find(b"ll", 1, 5)) +print(b"hello world".find(b"ll", -100)) +print(b"0000".find(b'0')) +print(b"0000".find(b'0', 0)) +print(b"0000".find(b'0', 1)) +print(b"0000".find(b'0', 2)) +print(b"0000".find(b'0', 3)) +print(b"0000".find(b'0', 4)) +print(b"0000".find(b'0', 5)) +print(b"0000".find(b'-1', 3)) +print(b"0000".find(b'1', 3)) +print(b"0000".find(b'1', 4)) +print(b"0000".find(b'1', 5)) |