mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-30 21:19:40 +00:00
13a261a08a
The prior test patched _load_metadata as a plain no-op, so __init__'s try block succeeded and never entered the except branch where the repo_type != "bucket" guard and get_safe_version live - the assertion passed vacuously (verified: it still passed with the guard removed). Use side_effect=[FileNotFoundError, None] so the first _load_metadata raises (forcing the except path) and the second succeeds after the meta pull, and stub _pull_from_repo so the path runs without a network call. Now the test fails if the bucket guard is removed. Thanks @mohitydv09 for the catch. Signed-off-by: Sundar Raghavan <sdraghav@amazon.com>