]> git.parisson.com Git - timeside.git/commitdiff
test: add test for VampSimpleHost
authorThomas Fillon <thomas@parisson.com>
Mon, 10 Nov 2014 14:57:13 +0000 (15:57 +0100)
committerThomas Fillon <thomas@parisson.com>
Mon, 10 Nov 2014 14:57:13 +0000 (15:57 +0100)
tests/test_vamp_simple_host.py [new file with mode: 0644]

diff --git a/tests/test_vamp_simple_host.py b/tests/test_vamp_simple_host.py
new file mode 100644 (file)
index 0000000..b20e600
--- /dev/null
@@ -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())