feat(pre_process_file):解决hxops上传excel行截断的问题,由markdown换为命中更好的key=value的方式;dify同步custom;行间\n\n,数据行单独成块;

This commit is contained in:
super committed 2026-06-11 11:19:21 +08:00
1 parent a18a07ef1a
commit 67d08924a4
25 files changed
+655 -25

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
"""Tests for edkb per-file timeout selection."""
from __future__ import annotations
from pathlib import Path
from edkb_system.controller import _file_timeout_sec
def test_excel_skips_spawn_timeout_wrapper(monkeypatch):
monkeypatch.setenv('EDKB_FILE_TIMEOUT_SEC', '180')
assert _file_timeout_sec(Path('report.xlsx')) is None
assert _file_timeout_sec(Path('data.csv')) is None
def test_word_still_uses_word_timeout(monkeypatch):
monkeypatch.setenv('EDKB_FILE_TIMEOUT_SEC', '180')
monkeypatch.setenv('EDKB_WORD_FILE_TIMEOUT_SEC', '420')
assert _file_timeout_sec(Path('manual.docx')) == 420
def test_other_formats_use_global_timeout(monkeypatch):
monkeypatch.setenv('EDKB_FILE_TIMEOUT_SEC', '180')
assert _file_timeout_sec(Path('slides.pptx')) == 180