def test_semitones_to_chord_options(semitones, options): assert semitones_to_chord_name_options(semitones) == options if options: assert Chord.from_semitones(None, semitones).name == options[0] else: assert Chord.from_semitones(None, semitones).name == Chord.UNNAMED
def test_chord_from_semitones(semi_in, semi_out): assert Chord.from_semitones("unnamed", semi_in).semitones == semi_out