From: Thomas Fillon Date: Mon, 10 Nov 2014 14:57:13 +0000 (+0100) Subject: test: add test for VampSimpleHost X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=3b6c68757f8e18e14b4d6f087d2b9a0a6f0131a2;p=timeside.git test: add test for VampSimpleHost --- diff --git a/tests/test_vamp_simple_host.py b/tests/test_vamp_simple_host.py new file mode 100644 index 0000000..b20e600 --- /dev/null +++ b/tests/test_vamp_simple_host.py @@ -0,0 +1,31 @@ +#! /usr/bin/env python + +from unit_timeside import unittest, TestRunner +from timeside.decoder.file import FileDecoder +from timeside.core import get_processor +from timeside import _WITH_VAMP +from timeside.tools.test_samples import samples + + +@unittest.skipIf(not _WITH_VAMP, 'vamp-simple-host library is not available') +class TestVampsimpleHost(unittest.TestCase): + + def setUp(self): + self.analyzer = get_processor('vamp_simple_host')() + + def testOnC4_scale(self): + "runs on C4_scale" + self.source = samples["C4_scale.wav"] + + def tearDown(self): + decoder = FileDecoder(self.source) + (decoder | self.analyzer).run() + results = self.analyzer.results + print results.keys() + #print results + #print results.to_yaml() + #print results.to_json() + #print results.to_xml() + +if __name__ == '__main__': + unittest.main(testRunner=TestRunner())