Spaces:
Sleeping
Sleeping
| 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 | |