Ejemplo n.º 1
0
def test_midi2freq_128():
    with pytest.raises(ValueError):
        result = midi2freq(128)
Ejemplo n.º 2
0
def test_midi2freq_21():
    assert midi2freq(21) == pytest.approx(27.50, abs=1e-2)
Ejemplo n.º 3
0
def test_midi2freq_n1():
    with pytest.raises(ValueError):
        result = midi2freq(-1)
Ejemplo n.º 4
0
def test_midi2freq_foo():
    with pytest.raises(ValueError):
        result = midi2freq("foo")
Ejemplo n.º 5
0
def test_midi2freq_69():
    assert midi2freq(69) == pytest.approx(440.000, abs=1e-2)
Ejemplo n.º 6
0
def test_midi2freq_60():
    assert midi2freq(60) == pytest.approx(261.63, abs=1e-2)
Ejemplo n.º 7
0
def test_midi2freq_33():
    assert midi2freq(33) == pytest.approx(55.00, abs=1e-2)