Files
lerobot/tests/datasets
Sundar Raghavan 13a261a08a test(streaming): make bucket get_safe_version test actually exercise the except branch
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>
2026-07-30 15:45:43 +02:00
..