Updates scikit-learn and fixes the warning this normally generates in the unit tests

This commit is contained in:
Trenton Holmes
2022-05-25 08:48:23 -07:00
committed by Johann Bauer
parent 00059e9482
commit ba79aff89b
4 changed files with 161 additions and 169 deletions

View File

@@ -204,7 +204,12 @@ class TestClassifier(DirectoriesMixin, TestCase):
MODEL_FILE=os.path.join(os.path.dirname(__file__), "data", "model.pickle"),
)
def test_load_and_classify(self):
# Generate test data, train and save to the model file
# This ensures the model file sklearn version matches
# and eliminates a warning
self.generate_test_data()
self.classifier.train()
self.classifier.save()
new_classifier = DocumentClassifier()
new_classifier.load()