Пример #1
0
 def test_overlap(self):
     hyp = [("A", 1.0, 3.0),
            ("B", 4.0, 7.1),
            ("A", 7.0, 9.0),
            ("C", 10.0, 13.0)]
     with self.assertRaises(ValueError):
         der.check_input(hyp)
Пример #2
0
 def test_wrong_speaker_type(self):
     hyp = [("A", 1.0, 3.0),
            ("B", 4.0, 7.1),
            ("A", 7.0, 9.0),
            (3, 10.0, 13.0)]
     with self.assertRaises(TypeError):
         der.check_input(hyp)
Пример #3
0
 def test_valid(self):
     ref = [("A", 1.0, 2.0),
            ("B", 4.0, 5.0),
            ("A", 6.7, 9.0),
            ("C", 10.0, 12.0),
            ("D", 12.0, 13.0)]
     hyp = [("A", 1.0, 3.0),
            ("B", 4.0, 4.8),
            ("A", 7.0, 9.0),
            ("C", 10.0, 13.0)]
     der.check_input(ref)
     der.check_input(hyp)