slm-training / tests /test_eval.py
debudash's picture
Mirror slm-training at 4376283
4643f62 verified
Raw History Blame Contribute Delete
610 Bytes
"""eval.py helpers."""
from eval import drop_empty_modal_tokens
def test_empty_modal_tokens_are_removed_so_the_modal_setup_login_applies():
# ISSUE-001, found by: all eight v3 evals failing with Modal AuthError "Token missing".
env = {"MODAL_TOKEN_ID": "", "MODAL_TOKEN_SECRET": "", "OTHER": ""}
drop_empty_modal_tokens(env)
assert env == {"OTHER": ""}
def test_real_modal_tokens_are_kept():
env = {"MODAL_TOKEN_ID": "ak-123", "MODAL_TOKEN_SECRET": "as-456"}
drop_empty_modal_tokens(env)
assert env == {"MODAL_TOKEN_ID": "ak-123", "MODAL_TOKEN_SECRET": "as-456"}