VLAarchtests3 / code /VLAarchtests2_code /VLAarchtests /tests /test_dataset_build_utils.py
lsnu's picture
Add files using upload-large-folder tool
31ade1f verified
from pathlib import Path
from train.dataset_build_utils import append_suffix_once, dataset_version_with_suffix, output_dataset_path
def test_append_suffix_once_idempotent():
assert append_suffix_once("proxy_train_phase", "selector_align") == "proxy_train_phase_selector_align"
assert append_suffix_once("proxy_train_phase_selector_align", "selector_align") == "proxy_train_phase_selector_align"
def test_output_dataset_path_keeps_existing_suffix():
expected = Path("/tmp/proxy_train_phase_selector_align.pt")
assert output_dataset_path("/tmp/proxy_train_phase.pt", "selector_align") == expected
assert output_dataset_path(expected, "selector_align") == expected
def test_dataset_version_with_suffix_keeps_existing_suffix():
assert dataset_version_with_suffix("reveal_proxy_v6_phase", "selector_align") == "reveal_proxy_v6_phase_selector_align"
assert dataset_version_with_suffix("reveal_proxy_v6_phase_selector_align", "selector_align") == "reveal_proxy_v6_phase_selector_align"