From ac0173e324c32ee1c0ec22e80b192f60135c18d7 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Sun, 22 Mar 2026 11:26:19 +0100 Subject: [PATCH] ENH: reshape: test copy= kwarg --- array_api_tests/test_manipulation_functions.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/array_api_tests/test_manipulation_functions.py b/array_api_tests/test_manipulation_functions.py index e886629b..8fda5bcd 100644 --- a/array_api_tests/test_manipulation_functions.py +++ b/array_api_tests/test_manipulation_functions.py @@ -428,11 +428,12 @@ def test_repeat(x, kw, data): @given( x=hh.arrays(dtype=hh.all_dtypes, shape=reshape_shape), shape=hh.reshape_shapes(reshape_shape), + kw=hh.kwargs(copy=st.booleans() | st.none()) ) -def test_reshape(x, shape): - repro_snippet = ph.format_snippet(f"xp.reshape({x!r},{shape!r})") - try: - out = xp.reshape(x, shape) +def test_reshape(x, shape, kw): + repro_snippet = ph.format_snippet(f"xp.reshape({x!r},{shape!r}, **kw) with {kw =}") + try: + out = xp.reshape(x, shape, **kw) ph.assert_dtype("reshape", in_dtype=x.dtype, out_dtype=out.dtype)