Author: Ronan Lamy <ronan.l...@gmail.com> Branch: py3k Changeset: r87615:fddfc58cb1a7 Date: 2016-10-06 16:57 +0100 http://bitbucket.org/pypy/pypy/changeset/fddfc58cb1a7/
Log: PyByteArray_Resize does not zero the memory when upsizing diff --git a/pypy/module/cpyext/test/test_bytearrayobject.py b/pypy/module/cpyext/test/test_bytearrayobject.py --- a/pypy/module/cpyext/test/test_bytearrayobject.py +++ b/pypy/module/cpyext/test/test_bytearrayobject.py @@ -179,7 +179,7 @@ )]) ret = module.bytearray_resize(b'abc', 6) assert len(ret) == 6,"%s, len=%d" % (ret, len(ret)) - assert ret == b'abc\x00\x00\x00' + assert ret[:4] == b'abc\x00' ret = module.bytearray_resize(b'abcdefghi', 4) assert len(ret) == 4,"%s, len=%d" % (ret, len(ret)) assert ret == b'abcd' _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit