From 23a3a5b464c85ab319228190ee460df8892d8272 Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Fri, 22 Aug 2025 11:44:50 +0100 Subject: [PATCH] Update argument names in picamera tests --- hardware-specific-tests/picamera2/test_acquisition.py | 2 +- .../picamera2/test_exposure_time_drift.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hardware-specific-tests/picamera2/test_acquisition.py b/hardware-specific-tests/picamera2/test_acquisition.py index 62b41058..3ab404eb 100644 --- a/hardware-specific-tests/picamera2/test_acquisition.py +++ b/hardware-specific-tests/picamera2/test_acquisition.py @@ -40,7 +40,7 @@ def test_jpeg_and_array(client): assert mjpeg_frame.format == "JPEG" # Capture a jpeg - blob = client.capture_jpeg(resolution="main") + blob = client.capture_jpeg(stream_name="main") jpeg_capture = Image.open(blob.open()) jpeg_capture.verify() assert jpeg_capture.format == "JPEG" diff --git a/hardware-specific-tests/picamera2/test_exposure_time_drift.py b/hardware-specific-tests/picamera2/test_exposure_time_drift.py index 9a737622..75700436 100644 --- a/hardware-specific-tests/picamera2/test_exposure_time_drift.py +++ b/hardware-specific-tests/picamera2/test_exposure_time_drift.py @@ -63,7 +63,7 @@ def _test_exposure_time_drift(desired_time: int) -> None: assert abs(pre_capture_et - desired_time) < EXPOSURE_TOL for i in range(10): - client.capture_jpeg(resolution="full") + client.capture_jpeg(stream_name="full") if i == 0: # Exposure can update on first capture, due to frame rate restrictions first_et = client.exposure_time @@ -80,7 +80,7 @@ def _test_exposure_time_drift(desired_time: int) -> None: time.sleep(0.5) # Check before and after capture assert client.exposure_time == frame_et - client.capture_jpeg(resolution="full") + client.capture_jpeg(stream_name="full") assert client.exposure_time == frame_et print("Exposure time didn't change!!") print(f"End of test for exposure target {desired_time}") @@ -106,7 +106,7 @@ def test_exposure_time_on_start_and_stop_stream(): # Take a couple of images to make sure that the exposure is adjusted to # a hardware compatible value. for _i in range(2): - client.capture_jpeg(resolution="full") + client.capture_jpeg(stream_name="full") # Save this time. set_time = client.exposure_time assert abs(set_time - desired_time) < EXPOSURE_TOL @@ -136,7 +136,7 @@ def _load_camera_and_return_exposure(tmpdir: str) -> int: # Take a couple of images to make sure that the exposure is adjusted to # a hardware compatible value. for _i in range(2): - client.capture_jpeg(resolution="full") + client.capture_jpeg(stream_name="full") # Save this time. return client.exposure_time