/
pash1ka
/
question-difficulty-classifier
Обзор
Документация
Войти
/
pash1ka
/
question-difficulty-classifier
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
tests/test_model.py
11 строк
387 B
Blinov Pavel
Fixed flake8 errors and improved code style
07 дек 2025, 17:01
07 дек 2025, 17:01
0603a68
Код
Авторство
О чём код?
import os from src.model import train_model def test_train_model(): """Test that model training produces a model.pkl file and returns accuracy.""" accuracy = train_model("data/sample_questions.csv", "test_model.pkl") assert os.path.exists("test_model.pkl") assert isinstance(accuracy, float) assert 0.0 <= accuracy <= 1.0 os.remove("test_model.pkl") # cleanup