def test_IsAnnotation_TrueNegative(self): self.assertFalse(Annotation.IsAnnotation( "Allegro")) self.assertFalse(Annotation.IsAnnotation( "Ludwig van Beethoven")) self.assertFalse(Annotation.IsAnnotation( "1 A Test")) self.assertFalse(Annotation.IsAnnotation( "A: A Test"))
def test_IsAnnotation_TruePositive(self): self.assertTrue(Annotation.IsAnnotation( "1: Exposition, 2: First Subject Group, 3: Theme a, 4: Sentence, 5: Presentation, 6: Basic idea")) self.assertTrue(Annotation.IsAnnotation( "6: Basic idea")) self.assertTrue(Annotation.IsAnnotation( "5: Continuation, 6: Fragmentation")) self.assertTrue(Annotation.IsAnnotation( "6: Cadence")) self.assertTrue(Annotation.IsAnnotation( "2: Transition, 3: Theme a")) self.assertTrue(Annotation.IsAnnotation( "4: X")) self.assertTrue(Annotation.IsAnnotation( "401: X, 502: X")) self.assertTrue(Annotation.IsAnnotation( "20: Second Subject Group, 3: Theme b, 4: Sentence, 5: Presentation, 6: Basic idea"))