def test_assert_on_invalid_r_possible(self): with self.assertRaises(AssertionError): scores._weighted_score(raw_earned=1, raw_possible=None, weight=1)
def test_computed(self, raw_earned, raw_possible, weight, expected_score): self.assertEquals( scores._weighted_score(raw_earned, raw_possible, weight), expected_score, )
def test_cannot_compute(self, raw_earned, raw_possible, weight): self.assertEquals( scores._weighted_score(raw_earned, raw_possible, weight), (raw_earned, raw_possible), )
def test_assert_on_invalid_r_possible(self): with self.assertRaises(AssertionError): scores._weighted_score(raw_earned=1, raw_possible=None, weight=1)
def test_computed(self, raw_earned, raw_possible, weight, expected_score): self.assertEquals( scores._weighted_score(raw_earned, raw_possible, weight), expected_score, )
def test_cannot_compute(self, raw_earned, raw_possible, weight): self.assertEquals( scores._weighted_score(raw_earned, raw_possible, weight), (raw_earned, raw_possible), )