From: Paul Brossier Date: Sun, 14 Apr 2013 19:28:48 +0000 (-0500) Subject: tests/test_aubio_temporal.py: rename and use unit_timeside X-Git-Tag: 0.5.0~115^2~43 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=22e8fdf4fe4289fdc04e4a395d10e17e212a2811;p=timeside.git tests/test_aubio_temporal.py: rename and use unit_timeside --- diff --git a/tests/test_aubio_temporal.py b/tests/test_aubio_temporal.py new file mode 100755 index 0000000..f7a2e3b --- /dev/null +++ b/tests/test_aubio_temporal.py @@ -0,0 +1,27 @@ +#! /usr/bin/env python + +from unit_timeside import * +from timeside.decoder import * +from timeside.analyzer.aubio_temporal import AubioTemporal + +class TestAubioTemporal(TestCase): + + def setUp(self): + self.analyzer = AubioTemporal() + + def testOnSweep(self): + "runs on sweep" + self.source = os.path.join (os.path.dirname(__file__), "samples", "sweep.wav") + + def testOnGuitar(self): + "runs on guitar" + self.source = os.path.join (os.path.dirname(__file__), "samples", "guitar.wav") + + def tearDown(self): + decoder = FileDecoder(self.source) + (decoder | self.analyzer).run() + results = self.analyzer.results() + # print results + +if __name__ == '__main__': + unittest.main(testRunner=TestRunner()) diff --git a/tests/testaubio_temporal.py b/tests/testaubio_temporal.py deleted file mode 100755 index ec8a25b..0000000 --- a/tests/testaubio_temporal.py +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env python - -from unit_timeside import * -from timeside.decoder import * -from timeside.analyzer.aubio_temporal import AubioTemporal - -class TestAubioTemporal(TestCase): - - def setUp(self): - self.analyzer = AubioTemporal() - - def testOnSweep(self): - "runs on sweep" - self.source = os.path.join (os.path.dirname(__file__), "samples", "sweep.wav") - - def testOnGuitar(self): - "runs on guitar" - self.source = os.path.join (os.path.dirname(__file__), "samples", "guitar.wav") - - def tearDown(self): - decoder = FileDecoder(self.source) - (decoder | self.analyzer).run() - for r in self.analyzer.results(): - assert hasattr(r, 'id') - assert hasattr(r, 'name') - assert hasattr(r, 'unit') - assert hasattr(r, 'value') - #print 'result:', r - -if __name__ == '__main__': - unittest.main(testRunner=TestRunner())