def test_to_major(self): known = { "C" : "Eb", "A" : "C", "E" : "G", "F" : "Ab", "D" : "F", "B" : "D", "B#" : "D#"} map(lambda x: self.assertEqual(known[x], notes.to_major(x),\ "The major of %s is not %s, expecting %s" % (x, notes.to_major(x), known[x])), known.keys())
def test_to_major(self): known = { 'C': 'Eb', 'A': 'C', 'E': 'G', 'F': 'Ab', 'D': 'F', 'B': 'D', 'B#': 'D#', } map(lambda x: self.assertEqual(known[x], notes.to_major(x), 'The major of %s is not %s, expecting %s' % (x, notes.to_major(x), known[x])), known.keys())
def test_to_major(self): known = { 'C': 'Eb', 'A': 'C', 'E': 'G', 'F': 'Ab', 'D': 'F', 'B': 'D', 'B#': 'D#', } list(map(lambda x: self.assertEqual(known[x], notes.to_major(x), 'The major of %s is not %s, expecting %s' % (x, notes.to_major(x), known[x])), list(known.keys())))
def to_major(self): """Calls notes.to_major with this note name as argument. \ Doesn't change the octave.""" self.name = notes.to_major(self.name)
def to_major(self): """Calls notes.to_major with this note name as argument. Doesn't change the \ octave.""" self.name = notes.to_major(self.name)