diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_base.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/test_base.py b/tests/test_base.py index 4dac897..f9807ef 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -24,8 +24,26 @@ class TestFrame(object): f.synth_residual = a assert np.all(f.synth_residual == a) - def test_peak(self): + def test_peaks(self): p = base.Peak() p.amplitude = 0.5 p.frequency = 220.0 p.phase = 0.0 + + f = base.Frame() + assert f.num_peaks == 0 + assert f.max_peaks > 0 + f.add_peak(p) + + assert f.num_peaks == 1 + assert f.peak(0).amplitude == p.amplitude + assert f.peaks[0].amplitude == p.amplitude + + f.clear_peaks() + assert f.num_peaks == 0 + + +class TestPeakDetection(object): + def test_peak_detection(self): + pd = base.PeakDetection() + print pd |