Start to move tests onto new camera api

This commit is contained in:
Julian Stirling 2026-05-27 23:28:19 +01:00
parent c18d43a3a5
commit b9c6071bc7
5 changed files with 10 additions and 10 deletions

View file

@ -26,7 +26,7 @@ def test_jpeg_and_array(picamera_client):
assert jpeg_capture.format == "JPEG"
# Capture an array
arrlist = picamera_client.capture_array(stream_name="main")
arrlist = picamera_client.capture_as_array(stream_name="main")
array_main = np.array(arrlist)
# Verify image sizes are the same

View file

@ -14,7 +14,7 @@ def test_streaming_mode():
with camera_test_client() as client:
for mode, res in ["default", (820, 616)], ["full_resolution", (3280, 2464)]:
client.change_streaming_mode(mode=mode)
arr = np.array(client.capture_array(stream_name="main"))
arr = np.array(client.capture_as_array(stream_name="main"))
# Check that the array dimensions match the requested image size.
# Note: Numpy array shape is (y,x), but the sensor is set with (x,y)
# hence the need to compare index 0 with index 1.