def test_check_contributions_1(self): """ Unit test check contributions 1 """ state = SmartState() contributions = pd.DataFrame([[-0.2, 0.1], [0.8, -0.4], [0.5, -0.7]], ) x_pred = pd.DataFrame([[1, 2], [3, 4]], ) assert not state.check_contributions(contributions, x_pred)
def test_check_contributions_2(self): """ Unit test check contributions 2 """ state = SmartState() contributions = pd.DataFrame([[-0.2, 0.1], [0.8, -0.4]], index=['row_1', 'row_2']) x_pred = pd.DataFrame([[1, 2], [3, 4]]) assert not state.check_contributions(contributions, x_pred)
def test_check_contributions_3(self): """ Unit test check contributions 3 """ state = SmartState() contributions = pd.DataFrame( [[-0.2, 0.1], [0.8, -0.4]], columns=['col_1', 'col_2'], ) x_pred = pd.DataFrame([[1, 2], [3, 4]], ) assert not state.check_contributions(contributions, x_pred)