()
| 538 | |
| 539 | |
| 540 | def test_garbage_collection(): |
| 541 | import gc |
| 542 | |
| 543 | # Force the cyclic garbage collector to run |
| 544 | gc.collect() |
| 545 | |
| 546 | bytes_before = pa.total_allocated_bytes() |
| 547 | pa.array([1, None, 3, None]) |
| 548 | gc.collect() |
| 549 | assert pa.total_allocated_bytes() == bytes_before |
| 550 | |
| 551 | |
| 552 | def test_sequence_double(): |