Пример #1
0
 def test_irregular_score_types(self):
     e = Exception("This is an error")
     score = ErrorScore(e)
     score = NAScore(None)
     score = TBDScore(None)
     score = NoneScore(None)
     score = InsufficientDataScore(None)
     self.assertEqual(score.norm_score, None)
Пример #2
0
    def test_irregular_score_types(self):
        e = Exception("This is an error")
        score = ErrorScore(e)
        score = NAScore(None)
        score = TBDScore(None)
        score = NoneScore(None)
        score = NoneScore("this is a string")
        self.assertIsInstance(str(score), str)
        self.assertRaises(InvalidScoreError, NoneScore,
                          ["this is a string list"])

        score = InsufficientDataScore(None)
        self.assertEqual(score.norm_score, None)
Пример #3
0
 def test_ErrorScore(self):
     score = ErrorScore(0.5)
     self.assertEqual(0.0, score.norm_score)
     self.assertIsInstance(score.summary, str)
     self.assertIsInstance(score._describe(), str)
     self.assertIsInstance(str(score), str)