arrow icon indicating copy to clipboard operation
arrow copied to clipboard

[Python] Some tests that are off by default use NumPy without @pytest.mark.numpy

Open rok opened this issue 3 weeks ago • 1 comments

Describe the bug, including details regarding any error messages, version, and platform.

A few tests use NumPy but have no numpy mark. They belong to groups that are off by default, so the no-NumPy CI job (conda-python-3.13-no-numpy) never runs them, and the missing mark goes unnoticed. large_memory tests only run on the ARM64 macOS job, and CUDA tests only run on GPU runners; both have NumPy installed.

Affected tests (these modules set np = None when NumPy is missing):

  • test_convert_builtin.py::test_auto_chunking_list_like (large_memory, uses np.ones)
  • test_convert_builtin.py::test_array_from_pylist_data_overflow (large_memory, uses np.zeros)
  • test_convert_builtin.py::test_array_from_pylist_offset_overflow (large_memory, slow, uses np.zeros)
  • test_array.py::test_non_cpu_array (needs CUDA, uses np.arange)

With NumPy uninstalled, running these with --enable-large_memory (or on a CUDA machine) fails with AttributeError: 'NoneType' object has no attribute ... instead of skipping.

The fix is to add @pytest.mark.numpy to these four tests.

Found while reviewing https://github.com/apache/arrow/pull/55264.

Component(s)

Python

rok avatar Nov 09 '26 16:11 rok

I would like to work on this issue. I will add the four missing NumPy markers and run the focused Python tests.

09Catho avatar Nov 10 '26 16:11 09Catho