def METHOD_NAME(self, signal, sr, freq, pitch_precision = 1, conf_precision = 0.1):
    frameSize = 1024
    hopsize = frameSize
    frames = FrameGenerator(signal, frameSize=frameSize, hopSize=hopsize)
    win = Windowing(type='hann')
    pitchDetect = PitchYinFFT(frameSize=frameSize, sampleRate = sr)
    pitch = []
    confidence = []
    for frame in frames:
        spec = Spectrum()(win(frame))
        f, conf = pitchDetect(spec)
        pitch += [f]
        confidence += [conf]
    self.assertAlmostEqual(mean(f), freq, pitch_precision)
    self.assertAlmostEqual(mean(confidence), 1, conf_precision)