This is an automated email from the ASF dual-hosted git repository.
paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git
The following commit(s) were added to refs/heads/main by this push:
new fbd699fd fix(python): Skip test relying on memoryview context manager
on PyPy 3.8 (#479)
fbd699fd is described below
commit fbd699fdafe8f8a5805b1a294a675da3e39731d7
Author: Dewey Dunnington <[email protected]>
AuthorDate: Sun May 19 15:57:18 2024 -0300
fix(python): Skip test relying on memoryview context manager on PyPy 3.8
(#479)
Apparently the context manager for the memoryview does not promptly
release its source buffer in PyPy 3.8. This PR skips the one assertion
where this matters on just that platform.
---
python/tests/test_c_buffer.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/python/tests/test_c_buffer.py b/python/tests/test_c_buffer.py
index fea83dc4..b3282aa4 100644
--- a/python/tests/test_c_buffer.py
+++ b/python/tests/test_c_buffer.py
@@ -222,6 +222,8 @@ def test_c_buffer_builder():
def test_c_buffer_builder_buffer_protocol():
+ import platform
+
builder = CBufferBuilder()
builder.reserve_bytes(1)
@@ -236,8 +238,12 @@ def test_c_buffer_builder_buffer_protocol():
mv[builder.size_bytes] = ord("k")
- builder.advance(1)
+ if platform.python_implementation() == "PyPy" and
platform.python_version_tuple()[
+ :2
+ ] == ("3", "8"):
+ pytest.skip("memoryview() release is not guaranteed on PyPy 3.8")
+ builder.advance(1)
assert bytes(builder.finish()) == b"k"