tests.interface package
Submodules
tests.interface.test_emailclassifierapp module
- class tests.interface.test_emailclassifierapp.TestEmailClassifierApp(methodName='runTest')[source]
Bases:
TestCaseClass with tests associated with EmailClassifierApp class.
- test_classifier_option_check_false()[source]
Method tests the classifier_option_check method of the class when it returns false.
- test_classifier_option_check_true()[source]
Method tests the classifier_option_check method of the class when it returns true.
- test_classify_3_stage_input_error_non_string_inside_list()[source]
Method tests the classify_emails_3_stage_pipelines when list contains non-string elements.
- test_classify_3_stage_input_error_not_list_or_str()[source]
Method tests the classify_emails_3_stage_pipelines when input is not str or list.
- test_classify_3_stage_model1_and_model2_not_found()[source]
Method tests the classify_emails_3_stage_pipelines when model1 and model2 are missing.
- test_classify_3_stage_model1_and_model3_not_found()[source]
Method tests the classify_emails_3_stage_pipelines when model1 and model3 are missing.
- test_classify_3_stage_model1_not_found()[source]
Method tests the classify_emails_3_stage_pipelines when model1 is missing.
- test_classify_3_stage_model2_and_model3_not_found()[source]
Method tests the classify_emails_3_stage_pipelines when model2 and model3 are missing.
- test_classify_3_stage_model2_not_found()[source]
Method tests the classify_emails_3_stage_pipelines when model2 is missing.
- test_classify_3_stage_model3_not_found()[source]
Method tests the classify_emails_3_stage_pipelines when model3 is missing.
- test_classify_3_stage_models_not_found()[source]
Method tests the classify_emails_3_stage_pipelines when models are missing.
- test_classify_3_stage_success_all_paths()[source]
Method tests the classify_emails_3_stage_pipelines with correct classification logic through all 3 stages using mocks.
- test_load_data_csv_exception()[source]
Method tests the load_data_csv method of the class, in the environment that returns an exception.
- test_load_data_csv_success()[source]
Test that checks if load_data_csv returns a DataFrame when given a valid path.
- test_predict_multiclassifier_invalid_input_type()[source]
Method tests the predict_with_multiclassifier exception route when input is invalid.
- test_predict_multiclassifier_invalid_list_element()[source]
Method tests the predict_with_multiclassifier exception route when element of input list is invalid.
- test_predict_multiclassifier_model_not_found()[source]
Method tests the predict_with_multiclassifier exception route when model is None.
- test_predict_multiclassifier_success()[source]
Method tests the predict_with_multiclassifier success route.
- test_set_multiclassifier_model_clf()[source]
Method tests the set_multiclassifier_model_clf method of the class.
- test_set_stacking_classifier_estimators_all_estimators()[source]
Method that tests set_stacking_classifier_estimators with all supported estimators.
- test_set_stacking_classifier_estimators_all_none()[source]
Method that tests set_stacking_classifier_estimators when all estimators are none.
- test_set_stacking_classifier_estimators_invalid_estimators()[source]
Method tests the set_stacking_classifier_estimators method exception route when estimators are invalid.
- test_set_stacking_classifier_estimators_success_default()[source]
Method that tests set_stacking_classifier_estimators success route with default estimators.
- test_set_voting_classifier_parameters_all_estimators()[source]
Method that tests set_voting_classifier_parameters method’s success route with all possible estimators.
- test_set_voting_classifier_parameters_invalid_estimators()[source]
Method tests the set_voting_classifier_parameters method exception route when estimators and voting option are invalid.
- test_set_voting_classifier_parameters_invalid_voting_option()[source]
Method that tests set_voting_classifier_parameters method exception route when voting option is invalid.
- test_set_voting_classifier_parameters_success_default_estimators()[source]
Method tests success route with default estimators for both hard and soft voting.
- test_train_3_stage_pipeline_unsupported_classifiers_fallback()[source]
Method that tests if Voting and Stacking classifiers are reset to MultinomialNB in 3 stage pipeline setup.
- test_train_3_stage_pipelines_all_supported_classifiers()[source]
Method that tests all possible supported classifiers usage for 3 stage pipelines training.
- test_train_3_stage_pipelines_invalid_classifier()[source]
Method tests the train_3_stage_pipelines method of the class when the provided classifier is invalid.
- test_train_3_stage_pipelines_success()[source]
Method tests the train_3_stage_pipelines method of the class.
- test_train_3_stage_stacking_classifier_not_supported()[source]
Method tests the train_3_stage_pipelines method of the class when the provided classifier is an unsupported StackingClassifier.
- test_train_3_stage_voting_classifier_not_supported()[source]
Method tests the train_3_stage_pipelines method of the class when the provided classifier is an unsupported VotingClassifier.
- test_train_multiclassifier_all_classifier_options()[source]
Method that tests all possible supported classifiers usage for multiclassifier training.
- test_train_multiclassifier_pipeline_invalid_classifier()[source]
Method tests if the invalid classifier option triggers ClassifierOptionError route in train_multiclassifier_pipeline method.
- test_train_multiclassifier_pipeline_success()[source]
Method tests the success route of train_multiclassifier_pipeline method.
- test_train_multiclassifier_stacking_classifier()[source]
Method that tests StackingClassifier getting set as multiclassifier model.
- test_train_multiclassifier_voting_classifier()[source]
Method that tests StackingClassifier getting set as multiclassifier model.
- test_view_3_stage_pipelines_accuracy_model_not_found()[source]
Method tests if view_3_stage_pipelines_accuracy returns None when any model is missing.
- test_view_3_stage_pipelines_accuracy_success()[source]
Method tests the success route for view_3_stage_pipelines_accuracy where accuracy of all 3 models is displayed.