Improve robustness of the full_auto_calibrate test on PiCamera
This commit is contained in:
parent
0a9b6be9bd
commit
4e5317291f
1 changed files with 6 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
"""Test data collection from the Raspberry Picamera."""
|
||||
|
||||
import tempfile
|
||||
from copy import deepcopy
|
||||
|
||||
from fastapi.testclient import TestClient
|
||||
import pytest
|
||||
|
|
@ -74,6 +75,8 @@ def test_get_tuning_algo(picamera_thing):
|
|||
|
||||
def test_calibration(picamera_thing, client):
|
||||
"""Check that full auto calibrate completes and set the expected values."""
|
||||
# Save copy of default tuning file for end of test
|
||||
original_default = deepcopy(picamera_thing.default_tuning)
|
||||
# Tuning should start the same as the server is loading with no settings.
|
||||
assert picamera_thing.default_tuning == picamera_thing.tuning
|
||||
# lens_shading tables should be None when loaded on default tuning as it is
|
||||
|
|
@ -87,6 +90,8 @@ def test_calibration(picamera_thing, client):
|
|||
|
||||
# After calibration the tuning files should be different
|
||||
assert picamera_thing.default_tuning != picamera_thing.tuning
|
||||
# The default should be unchanged
|
||||
assert picamera_thing.default_tuning == original_default
|
||||
# Lens shading tables should no longer be None
|
||||
assert picamera_thing.lens_shading_tables is not None
|
||||
# There should be exactly one colour correction matrix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue