[pypy-commit] pypy py3.5-bytearray: extra test
arigo
pypy.commits at gmail.com
Sat Dec 3 09:51:30 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5-bytearray
Changeset: r88849:5827553866d2
Date: 2016-12-03 15:46 +0100
http://bitbucket.org/pypy/pypy/changeset/5827553866d2/
Log: extra test
diff --git a/pypy/objspace/std/test/test_bytearrayobject.py b/pypy/objspace/std/test/test_bytearrayobject.py
--- a/pypy/objspace/std/test/test_bytearrayobject.py
+++ b/pypy/objspace/std/test/test_bytearrayobject.py
@@ -695,3 +695,15 @@
del x[3:10:2]
assert x.__alloc__() == 33
assert x == bytearray(b'acdfhjlmnopqrstuvwxyz')
+ #
+ x = make(shift=3)
+ assert b'f' in x
+ assert b'ef' in x
+ assert b'efx' not in x
+ assert b'very long string longer than the original' not in x
+ assert x.__alloc__() == 14
+ assert x.find(b'f') == 5
+ assert x.rfind(b'f', 2, 11) == 5
+ assert x.find(b'fe') == -1
+ assert x.index(b'f', 2, 11) == 5
+ assert x.__alloc__() == 14
More information about the pypy-commit
mailing list