Пример #1
0
    def test_roman_numeral_conversion_outside_harmony(self, tc):
        (key, chord, expected) = tc
        data = parse_chord(chord)

        actual = convert_to_roman_numeral(key, data)

        self.assertEqual(expected, actual.key)
Пример #2
0
 def test_parse_slash_bass_note(self, tc):
     actual = parse_chord(tc.data)
     self.assertEqual(actual, tc.expected)
Пример #3
0
 def test_parse_diminished_chord_symbol(self, tc):
     actual = parse_chord(tc)
     note = tc.replace("o", "").replace("7", "")
     expected = Chord(note, "Diminished", None)
     self.assertEqual(actual, expected)
Пример #4
0
 def test_parse_halfdiminished_chord_symbol(self, tc):
     actual = parse_chord(tc)
     expected = Chord(tc.replace("h7", ""), "Half-Diminished", None)
     self.assertEqual(actual, expected)
Пример #5
0
 def test_parse_minor_chord_symbol(self, tc):
     actual = parse_chord(tc)
     note = tc.replace("-", "").replace("7", "")
     expected = Chord(note, "Minor", None)
     self.assertEqual(actual, expected)
Пример #6
0
 def test_parse_dominant_chord_symbol(self, tc):
     actual = parse_chord(tc)
     expected = Chord(tc.replace("7", ""), "Dominant", None)
     self.assertEqual(actual, expected)