def test_assign_contributions_2(self): """ Unit test assign contributions 2 """ state = SmartState() ranked = [1, 2] with self.assertRaises(ValueError): state.assign_contributions(ranked)
def test_assign_contributions_1(self): """ Unit test assign contributions 1 """ state = SmartState() output = state.assign_contributions([1, 2, 3]) expected = {'contrib_sorted': 1, 'x_sorted': 2, 'var_dict': 3} self.assertDictEqual(output, expected)