Author: Armin Rigo <[email protected]>
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
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to