def test_1(self): chord = TreeChord() notations = chord.add_child(Notations()) dynamics = notations.add_child(Dynamics()) dynamics.add_child(FF()) note = chord.notes[0] note.add_child(Duration(1)) result = '''<note> <pitch> <step>B</step> <octave>4</octave> </pitch> <duration>1</duration> <notations> <dynamics placement="below"> <ff/> </dynamics> </notations> </note> ''' self.assertEqual(note.to_string(), result)
def test_1(self): chord = TreeChord() chord.add_child(Voice('1')) chord.remove_voice() self.assertEqual(chord.get_children(), [])