Example #1
0
 def test_unicode_naturals(self):
     n = self.prep(u'\u266E ')
     self.assertEqual(list(pcfor(n)), [9, 11, 0, 2, 4, 5, 7])
Example #2
0
 def test_unicode_flats(self):
     f = self.prep(u'\u266D ')
     self.assertEqual(list(pcfor(f)), [8, 10, 11, 1, 3, 4, 6])
Example #3
0
 def test_unicode_sharps(self):
     s = self.prep(u'\u266F ')
     self.assertEqual(list(pcfor(s)), [10, 0, 1, 3, 5, 6, 8])
Example #4
0
 def test_sharps(self):
     s = self.prep('# ')
     self.assertEqual(list(pcfor(s)), [10, 0, 1, 3, 5, 6, 8])
Example #5
0
 def test_flats(self):
     f = self.prep('b ')
     self.assertEqual(list(pcfor(f)), [8, 10, 11, 1, 3, 4, 6])
Example #6
0
 def test_natural(self):
     n = self.prep(' ')
     self.assertEqual(list(pcfor(n)), [9, 11, 0, 2, 4, 5, 7])
Example #7
0
 def test_empty_string(self):
     self.assertEqual(list(pcfor('')), [])
Example #8
0
 def test_trdef_pcset_notes(self):
     # looks like a notes test, but actually tests
     # whether ToneRow will accept a PcSet as input.
     a = "C Eb C# G F Bb D B F# Ab E A"
     t = ToneRow(pcfor(a))
     self.assertEqual(str(t), str(pcfor(a)))