24 lines
718 B
Python
24 lines
718 B
Python
import json
|
|||
|
|
from pathlib import Path
|
||
|
|
|
||
|
|
from apps.cli.run_combo import load_manifest, motif_manifest_failure_message
|
||
|
|
|
||
|
|
|
||
|
|
def test_combo_reports_failed_motif_manifest_before_missing_xml(tmp_path):
|
||
|
|
manifest_path = tmp_path / "failed.motif.manifest.json"
|
||
|
|
manifest_path.write_text(
|
||
|
|
json.dumps(
|
||
|
|
{
|
||
|
|
"stage": "motif",
|
||
|
|
"status": "failed",
|
||
|
|
"parameters": {"error": "MEME timeout (>3600s)"},
|
||
|
|
"metrics": {"error_type": "execution_failed"},
|
||
|
|
}
|
||
|
|
),
|
||
|
|
encoding="utf-8",
|
||
|
|
)
|
||
|
|
|
||
|
|
message = motif_manifest_failure_message(load_manifest(manifest_path))
|
||
|
|
|
||
|
|
assert message == "Motif upstream failed: MEME timeout (>3600s)"
|