Spaces:
Running
Running
File size: 541 Bytes
a229747 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | import os
from config import CFG
def test_device_string_valid():
assert CFG.device in {"mps", "cuda", "cpu"}
def test_num_labels_matches_label_names():
assert CFG.num_labels == len(CFG.label_names)
def test_dirs_created_on_init():
assert os.path.isdir(CFG.models_dir)
assert os.path.isdir(CFG.outputs_dir)
assert os.path.isdir(CFG.logs_dir)
def test_label_names_correct():
assert CFG.label_names == ["World", "Sports", "Business", "Sci/Tech"]
def test_max_length_positive():
assert CFG.max_length > 0
|