From 557f02a344c4e1c5c3c74555b024598fa1c883a2 Mon Sep 17 00:00:00 2001 From: Aryan Kumar <156166681+aryan5v@users.noreply.github.com> Date: Fri, 13 Nov 2026 20:20:30 +0000 Subject: [PATCH] [misc]: Make the offline discovery test fail on any download Greptile P2: the guarded resolver catches AssertionError, so raising inside the patched downloader could not fail the test. Record calls and assert none happened instead. --- .../tests/entrypoints/test_generation_capabilities.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fastvideo/tests/entrypoints/test_generation_capabilities.py b/fastvideo/tests/entrypoints/test_generation_capabilities.py index 6592d9b8a..1839dc49e 100644 --- a/fastvideo/tests/entrypoints/test_generation_capabilities.py +++ b/fastvideo/tests/entrypoints/test_generation_capabilities.py @@ -50,11 +50,15 @@ def test_unknown_family_does_not_advertise_h3_options(monkeypatch): def test_unresolved_model_path_stays_offline(monkeypatch): - def _no_download(*_args, **_kwargs): - raise AssertionError("model discovery must not download a Hub manifest") + downloads: list[tuple] = [] - monkeypatch.setattr("fastvideo.registry.maybe_download_model_index", _no_download) + def _record_download(*args, **kwargs): + downloads.append((args, kwargs)) + return {} + + monkeypatch.setattr("fastvideo.registry.maybe_download_model_index", _record_download) assert video_output_capabilities(SimpleNamespace(model_path="unregistered-org/unregistered-model")) is None + assert downloads == [] def test_model_info_exposes_output_constraints_without_generation(monkeypatch):