This is an automated email from the ASF dual-hosted git repository.
tadeja pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 3f84b02280b GH-55458: [Python] Mark NumPy-dependent tests (#55483)
3f84b02280b is described below
commit 3f84b02280b51174d26ca1dbf31a535aa3d231e9
Author: Atul <[email protected]>
AuthorDate: Mon Nov 23 19:22:26 2026 +0530
GH-55458: [Python] Mark NumPy-dependent tests (#55483)
### Rationale for this change
Four tests use NumPy but are missing `pytest.mark.numpy`. Without that
marker, the no-NumPy job does not exercise them and the tests can fail with an
AttributeError when an off-by-default group runs without NumPy.
### What changes are included in this PR?
Add `pytest.mark.numpy` to the three large-memory conversion tests and the
CUDA-backed `test_non_cpu_array` test named in #55458.
### Are these changes tested?
- `python -m py_compile python/pyarrow/tests/test_convert_builtin.py
python/pyarrow/tests/test_array.py` passed.
- An AST check confirmed all four target functions have the NumPy marker.
- `git diff --check` passed.
- The focused pytest commands could not collect because this shallow source
checkout does not contain the generated `pyarrow.lib` extension. No pytest
result is claimed.
### Are there any user-facing changes?
No. This only corrects test selection for environments without NumPy.
### Was AI used for this PR?
In accordance to the [AI generation
guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code),
please disclose below whether and how AI was used in this PR.
**PR code and description written by:**
- [ ] Human
- [x] AI
**Reviewed before submission by:**
- [x] Human
- [x] AI
- [ ] Not reviewed
* GitHub Issue: #55458
Authored-by: 09Catho <[email protected]>
Signed-off-by: Tadeja Kadunc <[email protected]>
---
python/pyarrow/tests/test_array.py | 1 +
python/pyarrow/tests/test_convert_builtin.py | 3 +++
2 files changed, 4 insertions(+)
diff --git a/python/pyarrow/tests/test_array.py
b/python/pyarrow/tests/test_array.py
index 6e19fbd9583..d4a60a16176 100644
--- a/python/pyarrow/tests/test_array.py
+++ b/python/pyarrow/tests/test_array.py
@@ -4574,6 +4574,7 @@ def test_swapped_byte_order_fails(numpy_native_dtype):
pa.StructArray.from_arrays([np_arr], names=['a'])
[email protected]
def test_non_cpu_array():
cuda = pytest.importorskip("pyarrow.cuda", exc_type=ImportError)
ctx = cuda.Context(0)
diff --git a/python/pyarrow/tests/test_convert_builtin.py
b/python/pyarrow/tests/test_convert_builtin.py
index 3ac7be88eaa..746aef8dcd8 100644
--- a/python/pyarrow/tests/test_convert_builtin.py
+++ b/python/pyarrow/tests/test_convert_builtin.py
@@ -2384,6 +2384,7 @@ def test_auto_chunking_list_of_binary():
assert arr.chunk(1).to_pylist() == [['x' * 1024]] * 2
[email protected]
@pytest.mark.large_memory
def test_auto_chunking_list_like():
item = np.ones((2**28,), dtype='uint8')
@@ -2452,6 +2453,7 @@ def test_nested_auto_chunking(ty, char):
}
[email protected]
@pytest.mark.large_memory
def test_array_from_pylist_data_overflow():
# Regression test for ARROW-12983
@@ -2474,6 +2476,7 @@ def test_array_from_pylist_data_overflow():
assert len(arr.chunks) > 1
[email protected]
@pytest.mark.slow
@pytest.mark.large_memory
def test_array_from_pylist_offset_overflow():