コード例 #1
0
def test_bandpass_high_error(silence_10s_mp3_str):
    s = Audio(silence_10s_mp3_str, sample_rate=10000)
    with pytest.raises(ValueError):
        s.bandpass(100, 5000)
コード例 #2
0
def test_bandpass(silence_10s_mp3_str):
    s = Audio(silence_10s_mp3_str, sample_rate=10000)
    assert isinstance(s.bandpass(0.001, 4999), Audio)
コード例 #3
0
def test_bandpass_low_error(silence_10s_mp3_str):
    s = Audio(silence_10s_mp3_str)
    with pytest.raises(ValueError):
        s.bandpass(0, 100)
コード例 #4
0
def test_bandpass(silence_10s_mp3_str):
    s = Audio(silence_10s_mp3_str)
    assert isinstance(s.bandpass(1, 100), Audio)