Exemplo n.º 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)
Exemplo n.º 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,
     )
Exemplo n.º 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),
     )
Exemplo n.º 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)
Exemplo n.º 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,
     )
Exemplo n.º 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),
     )