From 5b70ef466f08dbf0012186f25bfe3a8b4cd1bdf0 Mon Sep 17 00:00:00 2001 From: John Glover Date: Sun, 29 Jul 2012 20:39:34 +0100 Subject: [base] Clear new peak and partial lists with Frame.clear --- tests/test_base.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/test_base.py b/tests/test_base.py index 9d3173a..6cd2d39 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -40,18 +40,15 @@ class TestFrame(object): p.phase = 0.0 f = base.Frame() - assert f.num_peaks == 0 + assert len(f.peaks) == 0 assert f.max_peaks > 0 - f.add_peak(p) + f.peaks = [p] - assert f.num_peaks == 1 - assert_almost_equals(f.peak(0).amplitude, p.amplitude, - float_precision) assert_almost_equals(f.peaks[0].amplitude, p.amplitude, float_precision) f.clear() - assert f.num_peaks == 0 + assert len(f.peaks) == 0 def test_partials(self): N = 256 -- cgit v1.2.3