()
| 502 | |
| 503 | @pytest.mark.numpy |
| 504 | def test_buffer_address(): |
| 505 | b1 = b'some data!' |
| 506 | b2 = bytearray(b1) |
| 507 | b3 = bytearray(b1) |
| 508 | |
| 509 | buf1 = pa.py_buffer(b1) |
| 510 | buf2 = pa.py_buffer(b1) |
| 511 | buf3 = pa.py_buffer(b2) |
| 512 | buf4 = pa.py_buffer(b3) |
| 513 | |
| 514 | assert buf1.address > 0 |
| 515 | assert buf1.address == buf2.address |
| 516 | assert buf3.address != buf2.address |
| 517 | assert buf4.address != buf3.address |
| 518 | |
| 519 | arr = np.arange(5) |
| 520 | buf = pa.py_buffer(arr) |
| 521 | assert buf.address == arr.ctypes.data |
| 522 | |
| 523 | |
| 524 | @pytest.mark.numpy |
nothing calls this directly
no outgoing calls
no test coverage detected