Update test suite to cope with LabThings validating properties on write (https://github.com/labthings/labthings-fastapi/pull/278)

This commit is contained in:
Richard Bowman 2026-03-03 15:13:54 +00:00 committed by Julian Stirling
parent b298728fe5
commit d673ceab7b
2 changed files with 8 additions and 4 deletions

View file

@ -7,6 +7,7 @@ import numpy as np
import pytest
from hypothesis import given
from hypothesis import strategies as st
from pydantic import ValidationError
import labthings_fastapi as lt
@ -210,7 +211,7 @@ def test_objective_getter_setter(camera):
camera.objective = 15
with pytest.raises(ValueError, match=err_msg):
camera.objective = 0
with pytest.raises(ValueError, match=err_msg):
with pytest.raises(ValidationError):
camera.objective = "twenty"