示例#1
0
 def test_assert_on_invalid_r_possible(self):
     with self.assertRaises(AssertionError):
         scores._weighted_score(raw_earned=1, raw_possible=None, weight=1)
示例#2
0
 def test_computed(self, raw_earned, raw_possible, weight, expected_score):
     self.assertEquals(
         scores._weighted_score(raw_earned, raw_possible, weight),
         expected_score,
     )
示例#3
0
 def test_cannot_compute(self, raw_earned, raw_possible, weight):
     self.assertEquals(
         scores._weighted_score(raw_earned, raw_possible, weight),
         (raw_earned, raw_possible),
     )
示例#4
0
 def test_assert_on_invalid_r_possible(self):
     with self.assertRaises(AssertionError):
         scores._weighted_score(raw_earned=1, raw_possible=None, weight=1)
示例#5
0
 def test_computed(self, raw_earned, raw_possible, weight, expected_score):
     self.assertEquals(
         scores._weighted_score(raw_earned, raw_possible, weight),
         expected_score,
     )
示例#6
0
 def test_cannot_compute(self, raw_earned, raw_possible, weight):
     self.assertEquals(
         scores._weighted_score(raw_earned, raw_possible, weight),
         (raw_earned, raw_possible),
     )