Commit 33a4d87a authored by Armin Rigo's avatar Armin Rigo

A test that passes on CPython but fails on PyPy

parent 023e2f33ee07
......@@ -3974,6 +3974,15 @@ def test_from_buffer_types():
with pytest.raises(ValueError):
release(pv[0])
def test_issue483():
BInt = new_primitive_type("int")
BIntP = new_pointer_type(BInt)
BIntA = new_array_type(BIntP, None)
lst = list(range(25))
bytestring = bytearray(buffer(newp(BIntA, lst))[:] + b'XYZ')
p1 = from_buffer(BIntA, bytestring) # int[]
assert sizeof(p1) == 25 * size_of_int()
def test_memmove():
Short = new_primitive_type("short")
ShortA = new_array_type(new_pointer_type(Short), None)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment