Fix unit tests for stage_measrue as an OFMThing

This commit is contained in:
Julian Stirling 2026-05-14 16:49:29 +01:00
parent 5c128c1467
commit 714435f2d4
3 changed files with 25 additions and 8 deletions

View file

@ -5,6 +5,7 @@ with other Things and including them in the LabThings-FastAPI config file.
"""
import os
from types import TracebackType
from typing import Optional, Self
import labthings_fastapi as lt
@ -35,6 +36,19 @@ class OFMThing(lt.Thing):
)
return self
def __exit__(
self,
_exc_type: type[BaseException],
_exc_value: Optional[BaseException],
_traceback: Optional[TracebackType],
) -> None:
"""Close the OFMThing.
This is needed for the context manager protocol to work. Currently it doesn't
do anything.
"""
pass
@property
def data_dir(self) -> str:
"""The data directory for this thing."""