diff test/test_process.py @ 112:9343eee50605

Update to Python 3. Currently crashes during tests (and also, two tests are now failing, even with Py2).
author Chris Cannam
date Wed, 17 Jun 2015 12:35:41 +0100
parents 0c5a4dc04ed9
children 3489986a044c 2370b942cd32
line wrap: on
line diff
--- a/test/test_process.py	Wed Jun 17 11:04:15 2015 +0100
+++ b/test/test_process.py	Wed Jun 17 12:35:41 2015 +0100
@@ -22,18 +22,18 @@
 
 def test_process_n():
     buf = input_data(blocksize)
-    results = list(vamp.process(buf, rate, plugin_key, "input-summary"))
+    results = list(vamp.process_audio(buf, rate, plugin_key, "input-summary"))
     assert len(results) == 1
 
 def test_process_freq_n():
     buf = input_data(blocksize)
-    results = list(vamp.process(buf, rate, plugin_key_freq, "input-summary", {}))
+    results = list(vamp.process_audio(buf, rate, plugin_key_freq, "input-summary", {}))
     assert len(results) == 2 # one complete block starting at zero, one half-full
 
 def test_process_default_output():
     # If no output is specified, we should get the first one (instants)
     buf = input_data(blocksize)
-    results = list(vamp.process(buf, rate, plugin_key, "", {}))
+    results = list(vamp.process_audio(buf, rate, plugin_key, "", {}))
     assert len(results) == 10
     for i in range(len(results)):
         expectedTime = vamp.vampyhost.RealTime('seconds', i * 1.5)
@@ -42,7 +42,7 @@
 
 def test_process_summary_param():
     buf = input_data(blocksize * 10)
-    results = list(vamp.process(buf, rate, plugin_key, "input-summary", { "produce_output": 0 }))
+    results = list(vamp.process_audio(buf, rate, plugin_key, "input-summary", { "produce_output": 0 }))
     assert len(results) == 0
 
 def test_process_multi_summary_param():
@@ -52,7 +52,7 @@
 
 def test_process_summary_param_bool():
     buf = input_data(blocksize * 10)
-    results = list(vamp.process(buf, rate, plugin_key, "input-summary", { "produce_output": False }))
+    results = list(vamp.process_audio(buf, rate, plugin_key, "input-summary", { "produce_output": False }))
     assert len(results) == 0
 
 def test_process_multi_summary_param_bool():
@@ -62,7 +62,7 @@
 
 def test_process_summary():
     buf = input_data(blocksize * 10)
-    results = list(vamp.process(buf, rate, plugin_key, "input-summary", {}))
+    results = list(vamp.process_audio(buf, rate, plugin_key, "input-summary", {}))
     assert len(results) == 10
     for i in range(len(results)):
         #
@@ -120,7 +120,7 @@
 
 def test_process_freq_summary():
     buf = input_data(blocksize * 10)
-    results = list(vamp.process(buf, rate, plugin_key_freq, "input-summary", {}))
+    results = list(vamp.process_audio(buf, rate, plugin_key_freq, "input-summary", {}))
     assert len(results) == 20
     for i in range(len(results)):
         #
@@ -171,7 +171,7 @@
 
 def test_process_timestamps():
     buf = input_data(blocksize * 10)
-    results = list(vamp.process(buf, rate, plugin_key, "input-timestamp", {}))
+    results = list(vamp.process_audio(buf, rate, plugin_key, "input-timestamp", {}))
     assert len(results) == 10
     for i in range(len(results)):
         # The timestamp should be the frame number of the first frame in the
@@ -193,7 +193,7 @@
 
 def test_process_freq_timestamps():
     buf = input_data(blocksize * 10)
-    results = list(vamp.process(buf, rate, plugin_key_freq, "input-timestamp", {}))
+    results = list(vamp.process_audio(buf, rate, plugin_key_freq, "input-timestamp", {}))
     assert len(results) == 20
     for i in range(len(results)):
         # The timestamp should be the frame number of the frame just beyond