Exemplo n.º 1
0
 def test_get_cantus_firmus_range_too_high(self):
     """
     Notes greater than 17 are ignored.
     """
     raw = [18, 1]
     result = get_cantus_firmus(raw)
     expected = "g 1 \\bar \"|.\""
     self.assertEqual(expected, result)
Exemplo n.º 2
0
 def test_good_get_cantus_firmus(self):
     """
     The known good case.
     """
     raw = [5, 7, 6, 5, 8, 7, 9, 8, 7, 6, 5]
     result = get_cantus_firmus(raw)
     expected = "d' 1 f' e' d' g' f' a' g' f' e' d' \\bar \"|.\""
     self.assertEqual(expected, result)
Exemplo n.º 3
0
 def test_get_cantus_firmus_range_too_low(self):
     """
     Notes less than 1 are ignored.
     """
     raw = [0, 1]
     result = get_cantus_firmus(raw)
     expected = "g 1 \\bar \"|.\""
     self.assertEqual(expected, result)
Exemplo n.º 4
0
 def test_get_cantus_firmus_range_too_high(self):
     """
     Notes greater than 17 are ignored.
     """
     raw = [18, 1]
     result = get_cantus_firmus(raw)
     expected = "g 1 \\bar \"|.\""
     self.assertEqual(expected, result)
Exemplo n.º 5
0
 def test_get_cantus_firmus_range_too_low(self):
     """
     Notes less than 1 are ignored.
     """
     raw = [0, 1]
     result = get_cantus_firmus(raw)
     expected = "g 1 \\bar \"|.\""
     self.assertEqual(expected, result)
Exemplo n.º 6
0
 def test_good_get_cantus_firmus(self):
     """
     The known good case.
     """
     raw = [5, 7, 6, 5, 8, 7, 9, 8, 7, 6, 5]
     result = get_cantus_firmus(raw)
     expected = "d' 1 f' e' d' g' f' a' g' f' e' d' \\bar \"|.\""
     self.assertEqual(expected, result)
Exemplo n.º 7
0
 def test_empty_get_cantus_firmus(self):
     """
     An empty list should produce an empty string.
     """
     result = get_cantus_firmus([])
     self.assertEqual('', result)
Exemplo n.º 8
0
 def test_empty_get_cantus_firmus(self):
     """
     An empty list should produce an empty string.
     """
     result = get_cantus_firmus([])
     self.assertEqual('', result)