Mercurial > hg > vampy-host
comparison test/test_plugin_metadata.py @ 139:aa96f69e2f14
Add support for process timestamp method to low-level api
author | Chris Cannam |
---|---|
date | Wed, 08 Jul 2015 11:37:06 +0100 |
parents | 4f590fc46ace |
children | c64295f1cc33 |
comparison
equal
deleted
inserted
replaced
138:d3126719b094 | 139:aa96f69e2f14 |
---|---|
77 assert plug.info["identifier"] == "vamp-test-plugin" | 77 assert plug.info["identifier"] == "vamp-test-plugin" |
78 | 78 |
79 def test_parameterdescriptors(): | 79 def test_parameterdescriptors(): |
80 plug = vh.load_plugin(plugin_key, rate, vh.ADAPT_NONE) | 80 plug = vh.load_plugin(plugin_key, rate, vh.ADAPT_NONE) |
81 assert plug.parameters[0]["identifier"] == "produce_output" | 81 assert plug.parameters[0]["identifier"] == "produce_output" |
82 | |
83 def test_timestamp_method_fail(): | |
84 plug = vh.load_plugin(plugin_key, rate, vh.ADAPT_NONE) | |
85 try: | |
86 plug.set_process_timestamp_method(vh.SHIFT_DATA) | |
87 assert False | |
88 except Exception: | |
89 pass | |
90 | |
91 def test_timestamp_method_fail2(): | |
92 plug = vh.load_plugin(plugin_key, rate, vh.ADAPT_INPUT_DOMAIN) | |
93 # Not a freq-domain plugin: shouldn't throw, but should return false | |
94 assert (not plug.set_process_timestamp_method(vh.SHIFT_DATA)) | |
95 | |
96 def test_timestamp_method_succeed(): | |
97 plug = vh.load_plugin(plugin_key_freq, rate, vh.ADAPT_INPUT_DOMAIN) | |
98 assert plug.set_process_timestamp_method(vh.SHIFT_DATA) | |
82 | 99 |
83 def test_setparameter(): | 100 def test_setparameter(): |
84 plug = vh.load_plugin(plugin_key, rate, vh.ADAPT_NONE) | 101 plug = vh.load_plugin(plugin_key, rate, vh.ADAPT_NONE) |
85 assert plug.parameters[0]["identifier"] == "produce_output" | 102 assert plug.parameters[0]["identifier"] == "produce_output" |
86 assert plug.parameters[0]["defaultValue"] == 1 | 103 assert plug.parameters[0]["defaultValue"] == 1 |