def test_to_minor(self): known = { "C" : "A", "E" : "C#", "B" : "G#", "G" : "E", "F" : "D" } map(lambda x: self.assertEqual(known[x], notes.to_minor(x),\ "The minor of %s is not %s, expecting %s" % (x, notes.to_minor(x), known[x])), known.keys())
def test_to_minor(self): known = { 'C': 'A', 'E': 'C#', 'B': 'G#', 'G': 'E', 'F': 'D', } map(lambda x: self.assertEqual(known[x], notes.to_minor(x), 'The minor of %s is not %s, expecting %s' % (x, notes.to_minor(x), known[x])), known.keys())
def test_to_minor(self): known = { 'C': 'A', 'E': 'C#', 'B': 'G#', 'G': 'E', 'F': 'D', } list(map(lambda x: self.assertEqual(known[x], notes.to_minor(x), 'The minor of %s is not %s, expecting %s' % (x, notes.to_minor(x), known[x])), list(known.keys())))
''' Created on Jan 6, 2017 @author: stephenkoh ''' import mingus.core.notes as notes note = str(input('Please enter a note: ')) if (notes.is_valid_note(note)): note = notes.to_minor(note) note = notes.diminish(note) print(note)
def to_minor(self): """Calls notes.to_minor with this note as argument. \ Doesn't change the octave.""" self.name = notes.to_minor(self.name)
def to_minor(self): """Calls notes.to_minor with this note as argument. Doesn't change the \ octave.""" self.name = notes.to_minor(self.name)