Exemple #1
0
def test_rest_creation_accidental():
    r = Rest()
    assert r.accidental == None
Exemple #2
0
def test_rest_creation_pitch():
    r = Rest()
    assert r.pitch == None
Exemple #3
0
def test_rest_creation_octave():
    r = Rest()
    assert r.octave == None
Exemple #4
0
def test_greater_than_or_equal_to_rest():
    n1 = Note.from_midi_num(44)
    n2 = Rest()
    with pytest.raises(TypeError):
        n1 >= n2
Exemple #5
0
def test_less_than_rest():
    n1 = Note.from_midi_num(44)
    n2 = Rest()
    with pytest.raises(TypeError):
        n1 < n2
Exemple #6
0
def test_inequality_rest():
    n1 = Note.from_midi_num(44)
    n2 = Rest()
    with pytest.raises(TypeError):
        n1 != n2
Exemple #7
0
def test_enharmonic_rest():
    n1 = Note.from_midi_num(44)
    n2 = Rest()
    with pytest.raises(TypeError):
        n1.is_enharmonic(n2)
Exemple #8
0
def test_add_rest():
    n1 = Note.from_midi_num(44)
    n2 = Rest()
    with pytest.raises(TypeError):
        n3 = n1 + n2