From: Paul Brossier Date: Sat, 3 Nov 2007 14:51:07 +0000 (+0100) Subject: added simple phasevoc test X-Git-Tag: bzr2git~489 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0cbfa4a443ef40e57d20352a475afaa658673a09;p=aubio.git added simple phasevoc test --- diff --git a/tests/python/phasevoc.py b/tests/python/phasevoc.py new file mode 100644 index 00000000..cc71208d --- /dev/null +++ b/tests/python/phasevoc.py @@ -0,0 +1,30 @@ +import unittest + +from aubio.aubiowrapper import * + + +buf_size = 1024 +hop_size = 256 +channels = 2 + +class aubio_phasevoc_test(unittest.TestCase): + + def setUp(self): + self.o = new_aubio_pvoc(buf_size, hop_size, channels) + + def tearDown(self): + del_aubio_pvoc(self.o) + + def test_create(self): + """ test creation and deletion of phasevoc object """ + pass + + def test_zeroes(self): + """ test phasevoc object on zeroes """ + input = new_fvec(hop_size, channels) + fftgrain = new_cvec(buf_size, channels) + aubio_pvoc_do (self.o, input, fftgrain) + aubio_pvoc_rdo(self.o, fftgrain, input) + for index in range(buf_size): + for channel in range(channels): + self.assertEqual(0., fvec_read_sample(input, channel, index))