def test_double_peaks2(self): s = [0, 2, 0, -2, 0, -2] assert peakdetect_simpleedge(s) == [((s[1], 1), (0, 3)), ((s[4], 4), (3, 6))]
def test_nulllist(self): assert peakdetect_simpleedge([]) == []
def test_small_fall_after_peak(self): s = [0, 2, 1.5, 0] assert peakdetect_simpleedge(s) == [((s[1], 1), (0, 4))]
def test_double_peaks(self): s = [0, 2, 0, 2, 0] assert peakdetect_simpleedge(s) == [((s[1], 1), (0, 3)), ((s[3], 3), (2, 5))]
def test_small_raise_before_peak(self): s = [0, 1.5, 2, 0] assert peakdetect_simpleedge(s) == [((s[2], 2), (0, 4))]
def test_heading_excess_values(self): s = [-0.5, 0, 2, 0] assert peakdetect_simpleedge(s) == [((s[2], 2), (1, 4))]
def test_tailing_excess_values(self): s = [0, 2, 0, -1] assert peakdetect_simpleedge(s) == [((s[1], 1), (0, 3))]
def test_3points(self): s = [0, 2, 0] assert peakdetect_simpleedge(s) == [((s[1], 1), (0, 3))]
def test_singlelist(self): assert peakdetect_simpleedge([1]) == []