优化代码

This commit is contained in:
2026-06-04 15:28:53 +08:00
parent 83a425c235
commit d3af2309dc
7 changed files with 55 additions and 35 deletions
+2 -7
View File
@@ -2,7 +2,7 @@ import pytest
from pathlib import Path
from openpyxl import Workbook
from src.core.mil_read_data_excel import read_excel_data, get_data_log, ExcelReaderConfig
from src.core.mil_read_data_excel import read_excel_data, ExcelReaderConfig
from src.core.exceptions import ExcelReadError, ExcelFormatError
@@ -65,12 +65,7 @@ def test_datalog_is_list(sample_excel_path: Path):
assert hasattr(first_signal["datalog"][0], "value")
def test_get_data_log_empty_sheet():
"""空 sheet 返回空列表"""
wb = Workbook()
sheet = wb.active
datalog = get_data_log(sheet, row=1, column=1)
assert len(datalog) == 0
def test_read_excel_data_return_object(sample_excel_path: Path):