(ty)
| 362 | pa.string() |
| 363 | ]) |
| 364 | def test_nulls(ty): |
| 365 | arr = pa.nulls(3, type=ty) |
| 366 | expected = pa.array([None, None, None], type=ty) |
| 367 | |
| 368 | assert len(arr) == 3 |
| 369 | assert arr.equals(expected) |
| 370 | |
| 371 | if ty is None: |
| 372 | assert arr.type == pa.null() |
| 373 | else: |
| 374 | assert arr.type == ty |
| 375 | |
| 376 | |
| 377 | def test_array_from_scalar(): |