# HG changeset patch # User Chris Cannam # Date 1478697359 0 # Node ID af59617184563c20688181efe063d1ccbc33b399 # Parent 8b08cbbdfe774e66046220f426abf691d19e588e Update for v4 test plugin diff -r 8b08cbbdfe77 -r af5961718456 .hgsubstate --- a/.hgsubstate Tue Nov 08 11:41:09 2016 +0000 +++ b/.hgsubstate Wed Nov 09 13:15:59 2016 +0000 @@ -1,2 +1,2 @@ -89e7c9a834d3ec05cece0ed1c4b9a8ac825775e8 test/vamp-test-plugin +b35d5b2abf847f9102e58cb23bd37f69b26f8bda test/vamp-test-plugin c42aeb56d8288001ff45d6f00594e5f5b1e8f3de vamp-plugin-sdk diff -r 8b08cbbdfe77 -r af5961718456 test/test_plugin_metadata.py --- a/test/test_plugin_metadata.py Tue Nov 08 11:41:09 2016 +0000 +++ b/test/test_plugin_metadata.py Wed Nov 09 13:15:59 2016 +0000 @@ -8,7 +8,7 @@ rate = 44100 -expectedVersion = 3 +expectedVersion = 4 def test_plugin_exists(): assert plugin_key in vh.list_plugins() @@ -26,24 +26,24 @@ def test_getoutputlist(): outputs = vh.get_outputs_of(plugin_key) - assert len(outputs) == 10 + assert len(outputs) == 11 assert "input-summary" in outputs def test_getoutputlist_module(): outputs = vamp.get_outputs_of(plugin_key) - assert len(outputs) == 10 + assert len(outputs) == 11 assert "input-summary" in outputs def test_getoutputlist_2(): plug = vh.load_plugin(plugin_key, rate, vh.ADAPT_NONE) outputs = plug.get_outputs() - assert len(outputs) == 10 + assert len(outputs) == 11 def test_get_output_by_id(): plug = vh.load_plugin(plugin_key, rate, vh.ADAPT_NONE) out = plug.get_output("input-summary") assert "sampleType" in out - assert out["output_index"] == 8 + assert out["output_index"] == 9 try: out = plug.get_output("chops") assert False diff -r 8b08cbbdfe77 -r af5961718456 test/test_process_block.py --- a/test/test_process_block.py Tue Nov 08 11:41:09 2016 +0000 +++ b/test/test_process_block.py Wed Nov 09 13:15:59 2016 +0000 @@ -66,9 +66,9 @@ except TypeError: pass result = plug.process_block([[3,3]], vh.RealTime(0, 0)) - assert result[8] == [ { "label" : "", "values" : np.array([5.0]) } ] + assert result[9] == [ { "label" : "", "values" : np.array([5.0]) } ] result = plug.process_block([[3,0]], vh.RealTime(0, 0)) - assert result[8] == [ { "label" : "", "values" : np.array([4.0]) } ] + assert result[9] == [ { "label" : "", "values" : np.array([4.0]) } ] def test_process_output_2ch(): plug = vh.load_plugin(plugin_key, rate, vh.ADAPT_NONE) @@ -86,9 +86,9 @@ except TypeError: pass result = plug.process_block([[3,3],[4,4]], vh.RealTime(0, 0)) - assert (result[8][0]["values"] == np.array([5.0,6.0])).all() + assert (result[9][0]["values"] == np.array([5.0,6.0])).all() result = plug.process_block([[3,0],[4,0]], vh.RealTime(0, 0)) - assert (result[8][0]["values"] == np.array([4.0,5.0])).all() + assert (result[9][0]["values"] == np.array([4.0,5.0])).all() def test_process_output_3ch(): plug = vh.load_plugin(plugin_key, rate, vh.ADAPT_NONE) @@ -106,9 +106,9 @@ except TypeError: pass result = plug.process_block([[3,3],[4,4],[5,5]], vh.RealTime(0, 0)) - assert (result[8][0]["values"] == np.array([5.0,6.0,7.0])).all() + assert (result[9][0]["values"] == np.array([5.0,6.0,7.0])).all() result = plug.process_block([[3,0],[4,0],[5,0]], vh.RealTime(0, 0)) - assert (result[8][0]["values"] == np.array([4.0,5.0,6.0])).all() + assert (result[9][0]["values"] == np.array([4.0,5.0,6.0])).all()