()
| 635 | |
| 636 | @pytest.mark.numpy |
| 637 | def test_buffer_protocol_respects_immutability(): |
| 638 | # ARROW-3228; NumPy's frombuffer ctor determines whether a buffer-like |
| 639 | # object is mutable by first attempting to get a mutable buffer using |
| 640 | # PyObject_FromBuffer. If that fails, it assumes that the object is |
| 641 | # immutable |
| 642 | a = b'12345' |
| 643 | arrow_ref = pa.py_buffer(a) |
| 644 | numpy_ref = np.frombuffer(arrow_ref, dtype=np.uint8) |
| 645 | assert not numpy_ref.flags.writeable |
| 646 | |
| 647 | |
| 648 | @pytest.mark.numpy |
nothing calls this directly
no outgoing calls
no test coverage detected