Skip to content

Commit eaae493

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 868afa6 commit eaae493

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tests/test_cameras.py

+5-9
Original file line numberDiff line numberDiff line change
@@ -205,16 +205,11 @@ def test_save_images_from_cameras(tmp_path, request, camera_type, mock):
205205
# Small `record_time_s` to speedup unit tests
206206
save_images_from_cameras(tmp_path, record_time_s=0.02, mock=mock)
207207

208+
208209
@pytest.mark.parametrize("camera_type, mock", TEST_CAMERA_TYPES)
209210
@require_camera
210211
def test_camera(request, camera_type, mock):
211-
config_kwargs = {
212-
"camera_type": camera_type,
213-
"mock": mock,
214-
"width": 640,
215-
"height": 480,
216-
"fps": 30
217-
}
212+
config_kwargs = {"camera_type": camera_type, "mock": mock, "width": 640, "height": 480, "fps": 30}
218213

219214
# No rotation.
220215
camera = make_camera(**config_kwargs, rotation=None)
@@ -234,9 +229,10 @@ def test_camera(request, camera_type, mock):
234229
# With a 90° rotation, we expect the metadata dimensions to be swapped.
235230
assert camera.capture_width == 640
236231
assert camera.capture_height == 480
237-
assert camera.width == 480
238-
assert camera.height == 640
232+
assert camera.width == 480
233+
assert camera.height == 640
239234
import cv2
235+
240236
assert camera.rotation == cv2.ROTATE_90_CLOCKWISE
241237
rot_img = camera.read()
242238
h, w, c = rot_img.shape

0 commit comments

Comments
 (0)