develop #2

Merged
roberto merged 160 commits from develop into main 2026-06-12 15:27:23 +00:00
2 changed files with 2 additions and 5 deletions
Showing only changes of commit da282229ff - Show all commits

View File

@@ -4,7 +4,6 @@
# process: <content_type> → chiama preprocess(content_type, content)
#
# Sorgente: file: <nome in data/> oppure generate: binary_noise
# filename: override del nome file passato a detect (default: valore di file:)
#
# Assertions piatte (solo per process):
# no_html: true clean_text senza tag HTML
@@ -17,12 +16,10 @@
- id: "1.1"
file: email_action.html
filename: email_export.html
detect: email_html
- id: "1.2"
file: generic_page.html
filename: index.html
detect: generic_html
- id: "1.3"
@@ -30,8 +27,8 @@
detect: plain_text
- id: "1.4"
file: archive.xyz
generate: binary_noise
filename: archive.xyz
detect: unknown
- id: "1.5"

View File

@@ -68,7 +68,7 @@ def test_detect(preprocess_case, pytestconfig) -> None:
case = preprocess_case
data_dir = _fixtures_dir(pytestconfig) / "data"
raw = _content(case, data_dir)
filename = case.get("filename", case.get("file", ""))
filename = case.get("file", "")
ct = detect_content_type(filename, raw)
expected = case["detect"]
_lf_score(f"preprocess.detect.{case['id']}", 1.0 if ct == expected else 0.0)