def test_check_features_name_4(self): """ Unit test check features name 4 """ xpl = SmartExplainer() xpl.columns_dict = None xpl.features_dict = None feature_list = [1, 2, 4] output = xpl.check_features_name(feature_list) expected_output = feature_list np.testing.assert_array_equal(output, expected_output)
def test_check_features_name_3(self): """ Unit test check features name 3 """ xpl = SmartExplainer() xpl.columns_dict = {0: 'tech_0', 1: 'tech_1', 2: 'tech_2'} xpl.inv_columns_dict = {v: k for k, v in xpl.columns_dict.items()} feature_list = ['tech_2'] output = xpl.check_features_name(feature_list) expected_output = [2] np.testing.assert_array_equal(output, expected_output)