Author: Manuel Jacob <[email protected]>
Branch: py3.3
Changeset: r76175:64f039c98dcf
Date: 2015-02-27 16:29 +0100
http://bitbucket.org/pypy/pypy/changeset/64f039c98dcf/

Log:    Adapt this test to the new memoryview API.

diff --git a/pypy/module/__pypy__/test/test_bytebuffer.py 
b/pypy/module/__pypy__/test/test_bytebuffer.py
--- a/pypy/module/__pypy__/test/test_bytebuffer.py
+++ b/pypy/module/__pypy__/test/test_bytebuffer.py
@@ -5,15 +5,13 @@
         from __pypy__ import bytebuffer
         b = bytebuffer(12)
         assert len(b) == 12
-        b[3] = b'!'
-        b[5] = b'?'
+        b[3] = ord(b'!')
+        b[5] = ord(b'?')
         assert b[2:7] == b'\x00!\x00?\x00'
         b[9:] = b'+-*'
-        assert b[-1] == b'*'
-        assert b[-2] == b'-'
-        assert b[-3] == b'+'
-        exc = raises(ValueError, "b[3] = b'abc'")
-        assert str(exc.value) == "cannot modify size of memoryview object"
+        assert b[-1] == ord(b'*')
+        assert b[-2] == ord(b'-')
+        assert b[-3] == ord(b'+')
         exc = raises(ValueError, "b[3:5] = b'abc'")
         assert str(exc.value) == "cannot modify size of memoryview object"
         raises(NotImplementedError, "b[3:7:2] = b'abc'")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to