Beispiel #1
0
 def test_lower_c_in_c(self):
     raw_abc = """K:C\nC"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym=',')
     self.assertEqual("C,", note_to_play)
Beispiel #2
0
 def test_f_natural_in_g(self):
     raw_abc = """K:G\nCDEF GAB="""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym='f')
     self.assertEqual('f', note_to_play)
Beispiel #3
0
 def test_upper_c_in_c(self):
     raw_abc = """K:C\nCDEF GABc"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym="'")
     self.assertEqual("c'", note_to_play)
Beispiel #4
0
 def test_c_in_c(self):
     raw_abc = """K:C\nCDEF GAB"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym='c')
     self.assertEqual('c', note_to_play)
Beispiel #5
0
 def test_c_in_c(self):
     raw_abc = """K:C\nCDEF GAB"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym='c')
     self.assertEqual('c', note_to_play)
Beispiel #6
0
 def test_error_comma_after_upper_case_note(self):
     raw_abc = """K:C\nCDEF GABc"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym=',')
     self.assertEqual(None, note_to_play)
Beispiel #7
0
 def test_not_a_note(self):
     raw_abc = """K:G\nCDEF GAB"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym='t')
     self.assertEqual(None, note_to_play)
Beispiel #8
0
 def test_error_comma_after_upper_case_note(self):
     raw_abc = """K:C\nCDEF GABc"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym=',')
     self.assertEqual(None, note_to_play)
Beispiel #9
0
 def test_error_apostrophe_after_lower_case_note(self):
     raw_abc = """K:C\nCDEF GABC"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym="'")
     self.assertEqual(None, note_to_play)
Beispiel #10
0
 def test_no_note_before_octave_marker(self):
     raw_abc = """K:C\nCDEF GABc z"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym="'")
     self.assertEqual(None, note_to_play)
Beispiel #11
0
 def test_absolutely_nothing_before_octave_marker(self):
     raw_abc = ''
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym="'")
     self.assertEqual(None, note_to_play)
Beispiel #12
0
 def test_lower_c_in_c(self):
     raw_abc = """K:C\nC"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym=',')
     self.assertEqual("C,", note_to_play)
Beispiel #13
0
 def test_upper_c_in_c(self):
     raw_abc = """K:C\nCDEF GABc"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym="'")
     self.assertEqual("c'", note_to_play)
Beispiel #14
0
 def test_f_natural_in_g(self):
     raw_abc = """K:G\nCDEF GAB="""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym='f')
     self.assertEqual('f', note_to_play)
Beispiel #15
0
 def test_no_note_before_octave_marker(self):
     raw_abc = """K:C\nCDEF GABc z"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym="'")
     self.assertEqual(None, note_to_play)
Beispiel #16
0
 def test_not_a_note(self):
     raw_abc = """K:G\nCDEF GAB"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym='t')
     self.assertEqual(None, note_to_play)
Beispiel #17
0
 def test_absolutely_nothing_before_octave_marker(self):
     raw_abc = ''
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym="'")
     self.assertEqual(None, note_to_play)
Beispiel #18
0
 def test_in_comment(self):
     raw_abc = """K:G\n% CDEF GAB"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym='c')
     self.assertEqual(None, note_to_play)
Beispiel #19
0
 def test_error_apostrophe_after_lower_case_note(self):
     raw_abc = """K:C\nCDEF GABC"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym="'")
     self.assertEqual(None, note_to_play)
Beispiel #20
0
 def test_in_info_field(self):
     raw_abc = """K:G\nC:Paddy F"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym='a')
     self.assertEqual(None, note_to_play)
Beispiel #21
0
 def test_in_comment(self):
     raw_abc = """K:G\n% CDEF GAB"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym='c')
     self.assertEqual(None, note_to_play)
Beispiel #22
0
 def test_in_info_field(self):
     raw_abc = """K:G\nC:Paddy F"""
     mock_edit_zone = MockEditZone(raw_abc)
     note_to_play = get_note_to_play(mock_edit_zone, keysym='a')
     self.assertEqual(None, note_to_play)