|
8 | 8 |
|
9 | 9 | import pytest |
10 | 10 |
|
11 | | -from app.admin_queries import TRANSCRIBE_INSTALL_HINT, _EngineRuntimes |
| 11 | +from app.admin_queries import TRANSCRIBE_DOCS_URL, TRANSCRIBE_INSTALL_HINT, _EngineRuntimes |
12 | 12 | from app.catalog import DEFAULT_CATALOG |
13 | 13 | from app.config import Settings |
14 | 14 | from app.errors import EngineUnavailableError, LanguageUnsupportedError, TranscriptionProcessError |
@@ -291,6 +291,7 @@ def test_engine_runtimes_names_the_missing_binary_only_while_it_is_absent(tmp_pa |
291 | 291 | assert absent.entry_fields("transcribe.cpp") == { |
292 | 292 | "runtime_requirement": "transcribe.cpp CLI", |
293 | 293 | "runtime_hint": TRANSCRIBE_INSTALL_HINT, |
| 294 | + "runtime_docs_url": TRANSCRIBE_DOCS_URL, |
294 | 295 | } |
295 | 296 |
|
296 | 297 | present = _EngineRuntimes(_system(transcribe_cli="/opt/transcribe-cli"), _settings(tmp_path)) |
@@ -332,15 +333,20 @@ def card(**runtime) -> str: |
332 | 333 | warned = card( |
333 | 334 | runtime_requirement="transcribe.cpp CLI", |
334 | 335 | runtime_hint=TRANSCRIBE_INSTALL_HINT, |
| 336 | + runtime_docs_url=TRANSCRIBE_DOCS_URL, |
335 | 337 | ) |
336 | 338 | assert "needs transcribe.cpp CLI" in warned |
337 | 339 | assert "Not installed yet" in warned |
338 | 340 | assert "VOCAGATEWAY_TRANSCRIBE_BINARY" in warned |
| 341 | + assert TRANSCRIBE_DOCS_URL in warned |
| 342 | + assert "Installation instructions" in warned |
339 | 343 | # The weights are still correct, so the card must not block the download. |
340 | 344 | assert "Download" in warned |
341 | 345 |
|
342 | 346 | ready = card() |
343 | 347 | assert "needs transcribe.cpp CLI" not in ready |
| 348 | + # The old always-on aside warned even once the runtime was installed. |
| 349 | + assert "Installation instructions" not in ready |
344 | 350 | assert "Not installed yet" not in ready |
345 | 351 | assert "Download" in ready |
346 | 352 |
|
|
0 commit comments