Mercurial > hg > vampy-host
changeset 50:4aee7f2060ca
Update tests
author | Chris Cannam |
---|---|
date | Tue, 13 Jan 2015 12:11:34 +0000 |
parents | d4a3cd9dcf2c |
children | a78b14c41c74 |
files | test_plugin_metadata.py test_process.py |
diffstat | 2 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/test_plugin_metadata.py Tue Jan 13 12:10:18 2015 +0000 +++ b/test_plugin_metadata.py Tue Jan 13 12:11:34 2015 +0000 @@ -11,15 +11,15 @@ assert "input-summary" in outputs def test_inputdomain(): - plug = vh.loadPlugin(testPluginKey, rate) + plug = vh.loadPlugin(testPluginKey, rate, vh.AdaptNone) assert plug.inputDomain == vh.TimeDomain def test_info(): - plug = vh.loadPlugin(testPluginKey, rate) + plug = vh.loadPlugin(testPluginKey, rate, vh.AdaptNone) assert plug.info["identifier"] == "vamp-test-plugin" def test_parameterdescriptors(): - plug = vh.loadPlugin(testPluginKey, rate) + plug = vh.loadPlugin(testPluginKey, rate, vh.AdaptNone) assert plug.parameters[0]["identifier"] == "produce_output"
--- a/test_process.py Tue Jan 13 12:10:18 2015 +0000 +++ b/test_process.py Tue Jan 13 12:11:34 2015 +0000 @@ -9,7 +9,7 @@ rate = 44100 def test_load_unload(): - plug = vh.loadPlugin(testPluginKey, rate) + plug = vh.loadPlugin(testPluginKey, rate, vh.AdaptNone) plug.unload() try: plug.unload() # should throw but not crash @@ -18,7 +18,7 @@ pass def test_get_set_parameter(): - plug = vh.loadPlugin(testPluginKey, rate) + plug = vh.loadPlugin(testPluginKey, rate, vh.AdaptNone) value = plug.getParameterValue("produce_output") assert(value == 1.0) plug.setParameterValue("produce_output", 0.0) @@ -26,7 +26,7 @@ assert(value == 0.0) def test_process_without_initialise(): - plug = vh.loadPlugin(testPluginKey, rate) + plug = vh.loadPlugin(testPluginKey, rate, vh.AdaptNone) try: plug.process([[1,2,3,4]], vh.RealTime(0, 0)) assert False @@ -34,7 +34,7 @@ pass def test_process_input_format(): - plug = vh.loadPlugin(testPluginKey, rate) + plug = vh.loadPlugin(testPluginKey, rate, vh.AdaptNone) plug.initialise(2, 4, 4) # channels, stepsize, blocksize result = plug.process([[1,2,3,4],[5,6,7,8]], vh.RealTime(0, 0)) result = plug.process([np.array([1,2,3,4]),np.array([5,6,7,8])], vh.RealTime(0, 0)) @@ -59,7 +59,7 @@ pass def test_process_output_1ch(): - plug = vh.loadPlugin(testPluginKey, rate) + plug = vh.loadPlugin(testPluginKey, rate, vh.AdaptNone) plug.initialise(1, 2, 2) try: # Too many channels @@ -73,7 +73,7 @@ assert result[8] == [ { "label" : "", "values" : np.array([4.0]) } ] def test_process_output_2ch(): - plug = vh.loadPlugin(testPluginKey, rate) + plug = vh.loadPlugin(testPluginKey, rate, vh.AdaptNone) plug.initialise(2, 2, 2) try: # Too few channels @@ -93,7 +93,7 @@ assert (result[8][0]["values"] == np.array([4.0,5.0])).all() def test_process_output_3ch(): - plug = vh.loadPlugin(testPluginKey, rate) + plug = vh.loadPlugin(testPluginKey, rate, vh.AdaptNone) plug.initialise(3, 2, 2) try: # Too few channels