Exemple #1
0
def test_octave_num_breaks():
    """octave_num_to_lily() when it doesn't work"""
    with pytest.raises(problems.UnidentifiedObjectError):
        functions.octave_num_to_lily(-10)
    with pytest.raises(problems.UnidentifiedObjectError):
        functions.octave_num_to_lily(-1)
    with pytest.raises(problems.UnidentifiedObjectError):
        functions.octave_num_to_lily(13)
    with pytest.raises(problems.UnidentifiedObjectError):
        functions.octave_num_to_lily(128)
Exemple #2
0
 def test_octave_num_to_lily_15(self):
     self.assertEqual(functions.octave_num_to_lily(12), u"'''''''''")
Exemple #3
0
 def test_octave_num_to_lily_7(self):
     self.assertEqual(functions.octave_num_to_lily(4), u"'")
Exemple #4
0
 def test_octave_num_to_lily_6(self):
     self.assertEqual(functions.octave_num_to_lily(3), u'')
Exemple #5
0
 def test_octave_num_to_lily_5(self):
     self.assertEqual(functions.octave_num_to_lily(2), u',')
Exemple #6
0
 def test_octave_num_to_lily_3(self):
     self.assertEqual(functions.octave_num_to_lily(0), u',,,')
 def test_octave_num_to_lily_15(self):
     self.assertEqual(functions.octave_num_to_lily(12), u"'''''''''")
 def test_octave_num_to_lily_7(self):
     self.assertEqual(functions.octave_num_to_lily(4), u"'")
 def test_octave_num_to_lily_6(self):
     self.assertEqual(functions.octave_num_to_lily(3), u'')
 def test_octave_num_to_lily_5(self):
     self.assertEqual(functions.octave_num_to_lily(2), u',')
 def test_octave_num_to_lily_3(self):
     self.assertEqual(functions.octave_num_to_lily(0), u',,,')
Exemple #12
0
def test_octave_num_works():
    """octave_num_to_lily() when it works"""
    assert functions.octave_num_to_lily(0) == u',,,'
    assert functions.octave_num_to_lily(1) == u',,'
    assert functions.octave_num_to_lily(2) == u','
    assert functions.octave_num_to_lily(3) == u''
    assert functions.octave_num_to_lily(4) == u"'"
    assert functions.octave_num_to_lily(5) == u"''"
    assert functions.octave_num_to_lily(6) == u"'''"
    assert functions.octave_num_to_lily(7) == u"''''"
    assert functions.octave_num_to_lily(8) == u"'''''"
    assert functions.octave_num_to_lily(9) == u"''''''"
    assert functions.octave_num_to_lily(10) == u"'''''''"
    assert functions.octave_num_to_lily(11) == u"''''''''"
    assert functions.octave_num_to_lily(12) == u"'''''''''"