Esempio n. 1
0
 def test_duration_to_lily_1(self):
     # Simple things
     self.assertEqual(functions.duration_to_lily(duration.Duration(1.0)),
                      '4')
Esempio n. 2
0
 def test_duration_to_lily_4(self):
     self.assertEqual(functions.duration_to_lily(duration.Duration(3.0)),
                      '2.')
Esempio n. 3
0
 def test_duration_to_lily_20(self):
     with pytest.raises(problems.ImpossibleToProcessError):
         functions.duration_to_lily(duration.Duration(0.01268128))
Esempio n. 4
0
 def test_duration_to_lily_24(self):
     expected = u"16."
     actual = functions.duration_to_lily(duration.Duration(0.375))
     self.assertEqual(actual, expected)
Esempio n. 5
0
 def test_duration_to_lily_15(self):
     self.assertEqual(functions.duration_to_lily(duration.Duration(3.75)),
                      '2...')
Esempio n. 6
0
 def test_duration_to_lily_22(self):
     # tuplet component--should work
     self.assertEqual(
         functions.duration_to_lily(duration.Duration(0.16666666), True),
         '16')
Esempio n. 7
0
 def test_duration_to_lily_11(self):
     self.assertEqual(functions.duration_to_lily(duration.Duration(0.0625)), '64')
Esempio n. 8
0
 def test_duration_to_lily_11(self):
     self.assertEqual(functions.duration_to_lily(duration.Duration(0.0625)),
                      '64')
Esempio n. 9
0
 def test_duration_to_lily_9(self):
     # Same as above, but with known_tuplet==True... all results should be the same.
     self.assertEqual(functions.duration_to_lily(duration.Duration(1.0)), '4')
Esempio n. 10
0
 def test_duration_to_lily_10(self):
     self.assertEqual(functions.duration_to_lily(duration.Duration(16.0)), '\\longa')
Esempio n. 11
0
 def test_duration_to_lily_4(self):
     self.assertEqual(functions.duration_to_lily(duration.Duration(3.0)), '2.')
Esempio n. 12
0
 def test_duration_to_lily_1(self):
     # Simple things
     self.assertEqual(functions.duration_to_lily(duration.Duration(1.0)), '4')
Esempio n. 13
0
 def test_duration_to_lily_25(self):
     expected = u"1"
     actual = functions.duration_to_lily(duration.DurationTuple('whole', 0, 4.0))
     self.assertEqual(actual, expected)
Esempio n. 14
0
 def test_duration_to_lily_9(self):
     # Same as above, but with known_tuplet==True... all results should be the same.
     self.assertEqual(functions.duration_to_lily(duration.Duration(1.0)),
                      '4')
Esempio n. 15
0
 def test_duration_to_lily_13(self):
     self.assertEqual(functions.duration_to_lily(duration.Duration(0.1875)), '32.')
Esempio n. 16
0
 def test_duration_to_lily_10(self):
     self.assertEqual(functions.duration_to_lily(duration.Duration(16.0)),
                      '\\longa')
Esempio n. 17
0
 def test_duration_to_lily_15(self):
     self.assertEqual(functions.duration_to_lily(duration.Duration(3.75)), '2...')
Esempio n. 18
0
 def test_duration_to_lily_13(self):
     self.assertEqual(functions.duration_to_lily(duration.Duration(0.1875)),
                      '32.')
Esempio n. 19
0
 def test_duration_to_lily_16(self):
     self.assertEqual(functions.duration_to_lily(duration.Duration(0.12109375)), '64....')
Esempio n. 20
0
 def test_duration_to_lily_16(self):
     self.assertEqual(
         functions.duration_to_lily(duration.Duration(0.12109375)),
         '64....')
Esempio n. 21
0
 def test_duration_to_lily_22(self):
     # tuplet component--should work
     self.assertEqual(functions.duration_to_lily(duration.Duration(0.16666666), True), '16')
Esempio n. 22
0
 def test_duration_to_lily_24(self):
     expected = u"16."
     actual = functions.duration_to_lily(duration.Duration(0.375))
     self.assertEqual(actual, expected)
Esempio n. 23
0
 def test_duration_to_lily_19(self):
     with pytest.raises(problems.ImpossibleToProcessError):
         functions.duration_to_lily(duration.Duration(25.0))