[pypy-commit] pypy py3.6: add failing ctypes test that causes socket.sendall() failure
mattip
pypy.commits at gmail.com
Wed Aug 14 12:42:15 EDT 2019
Author: Matti Picus <matti.picus at gmail.com>
Branch: py3.6
Changeset: r97177:1deb84428ab6
Date: 2019-08-14 19:39 +0300
http://bitbucket.org/pypy/pypy/changeset/1deb84428ab6/
Log: add failing ctypes test that causes socket.sendall() failure
diff --git a/extra_tests/ctypes_tests/test_cast.py b/extra_tests/ctypes_tests/test_cast.py
--- a/extra_tests/ctypes_tests/test_cast.py
+++ b/extra_tests/ctypes_tests/test_cast.py
@@ -28,3 +28,11 @@
assert x.value is False
x = c_bool(['yadda'])
assert x.value is True
+
+def test_cast_array():
+ data = b'data'
+ ubyte = c_ubyte * len(data)
+ byteslike = ubyte.from_buffer_copy(data)
+ m = memoryview(byteslike)
+ b = m.cast('B')
+ assert bytes(b) == data
More information about the pypy-commit
mailing list