示例#1
0
	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())
示例#3
0
 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())))
示例#4
0
文件: Note.py 项目: anzev/mingus
    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)
示例#5
0
    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)