You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
527 B
6 lines
527 B
from pathlib import Path
|
|
from src.calibration_history import CalibrationHistory
|
|
from src.models import CalibrationChangeRecord
|
|
def test_calibration_roundtrip_bom(tmp_path:Path)->None:
|
|
h=CalibrationHistory(tmp_path/"h.csv");r=CalibrationChangeRecord("id1","now","学生","camera_position","横","正面","改善");h.append(r);assert h.path.read_bytes().startswith(b"\xef\xbb\xbf");assert h.load()[0].after_value=="正面"
|
|
def test_empty_history(tmp_path:Path)->None:assert CalibrationHistory(tmp_path/"none.csv").load()==[]
|
|
|