(self)
| 406 | self.assertRaises(NoteFormatError, chords.from_shorthand, x[1:]) |
| 407 | |
| 408 | def test_determine(self): |
| 409 | for x in chords.chord_shorthand: |
| 410 | self.assertEqual( |
| 411 | True, |
| 412 | chords.determine(chords.from_shorthand("C" + x)) != [], |
| 413 | "'C%s' should return a value" % x, |
| 414 | ) |
| 415 | for x in (x for x in chords.chord_shorthand if x != "5"): |
| 416 | self.assertEqual( |
| 417 | "C" + chords.chord_shorthand_meaning[x], |
| 418 | chords.determine(chords.from_shorthand("C" + x))[0], |
| 419 | "The proper naming of '%s' is not '%s',expecting '%s'" |
| 420 | % ( |
| 421 | "C" + x, |
| 422 | chords.determine(chords.from_shorthand("C" + x)), |
| 423 | "C" + chords.chord_shorthand_meaning[x], |
| 424 | ), |
| 425 | ) |
| 426 | self.chordsTest( |
| 427 | [ |
| 428 | [["A13"], ["A", "C#", "E", "G", "B", "D", "F#",]], |
| 429 | [["Am13"], ["A", "C", "E", "G", "B", "D", "F#",]], |
| 430 | [["AM13"], ["A", "C#", "E", "G#", "B", "D", "F#",]], |
| 431 | ], |
| 432 | lambda x: chords.determine(x, True), |
| 433 | "chord name", |
| 434 | ) |
| 435 | |
| 436 | def test_determine_polychord(self): |
| 437 | self.chordsTest( |
nothing calls this directly
no test coverage detected