Spaces:
Running on Zero
Running on Zero
File size: 376 Bytes
e71990c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import os
import pytest
from src.predict import LABEL_DECODER, predict
pytestmark = pytest.mark.skipif(
"HF_REPO_ID" not in os.environ, reason="requires HF_REPO_ID (downloads the real checkpoint)"
)
def test_predict_returns_known_label():
label = predict("Wall Street stocks rallied after the Federal Reserve meeting.")
assert label in LABEL_DECODER.values()
|