Beispiel #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)
Beispiel #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,
     )
Beispiel #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),
     )
Beispiel #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)
Beispiel #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,
     )
Beispiel #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),
     )