优化代码
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user