Mercurial > hg > vampy-host
comparison test/test_plugin_metadata.py @ 102:216ed5a72c36
Some preliminary changes toward py2/3 compatibility (but the module load stuff remains quite a big deal)
author | Chris Cannam |
---|---|
date | Tue, 10 Feb 2015 12:28:53 +0000 |
parents | dd56716714e0 |
children | cf56111935fa |
comparison
equal
deleted
inserted
replaced
101:0c5a4dc04ed9 | 102:216ed5a72c36 |
---|---|
36 assert "sample_type" in out | 36 assert "sample_type" in out |
37 assert out["output_index"] == 8 | 37 assert out["output_index"] == 8 |
38 try: | 38 try: |
39 out = plug.get_output("chops") | 39 out = plug.get_output("chops") |
40 assert False | 40 assert False |
41 except StandardError: | 41 except Exception: |
42 pass | 42 pass |
43 try: | 43 try: |
44 out = plug.get_output("") | 44 out = plug.get_output("") |
45 assert False | 45 assert False |
46 except StandardError: | 46 except Exception: |
47 pass | 47 pass |
48 | 48 |
49 def test_get_output_by_index(): | 49 def test_get_output_by_index(): |
50 plug = vh.load_plugin(plugin_key, rate, vh.ADAPT_NONE) | 50 plug = vh.load_plugin(plugin_key, rate, vh.ADAPT_NONE) |
51 out = plug.get_output(0) | 51 out = plug.get_output(0) |
53 assert out["identifier"] == "instants" | 53 assert out["identifier"] == "instants" |
54 assert out["output_index"] == 0 | 54 assert out["output_index"] == 0 |
55 try: | 55 try: |
56 out = plug.get_output(20) | 56 out = plug.get_output(20) |
57 assert False | 57 assert False |
58 except StandardError: | 58 except Exception: |
59 pass | 59 pass |
60 try: | 60 try: |
61 out = plug.get_output(-1) | 61 out = plug.get_output(-1) |
62 assert False | 62 assert False |
63 except StandardError: | 63 except Exception: |
64 pass | 64 pass |
65 try: | 65 try: |
66 out = plug.get_output(plug) | 66 out = plug.get_output(plug) |
67 assert False | 67 assert False |
68 except StandardError: | 68 except Exception: |
69 pass | 69 pass |
70 | 70 |
71 def test_inputdomain(): | 71 def test_inputdomain(): |
72 plug = vh.load_plugin(plugin_key, rate, vh.ADAPT_NONE) | 72 plug = vh.load_plugin(plugin_key, rate, vh.ADAPT_NONE) |
73 assert plug.input_domain == vh.TIME_DOMAIN | 73 assert plug.input_domain == vh.TIME_DOMAIN |
100 except TypeError: | 100 except TypeError: |
101 pass | 101 pass |
102 try: | 102 try: |
103 plug.set_parameter_value("steak", 0) | 103 plug.set_parameter_value("steak", 0) |
104 assert False | 104 assert False |
105 except StandardError: | 105 except Exception: |
106 pass | 106 pass |
107 try: | 107 try: |
108 plug.get_parameter_value(4) | 108 plug.get_parameter_value(4) |
109 assert False | 109 assert False |
110 except TypeError: | 110 except TypeError: |
111 pass | 111 pass |
112 try: | 112 try: |
113 plug.get_parameter_value("steak") | 113 plug.get_parameter_value("steak") |
114 assert False | 114 assert False |
115 except StandardError: | 115 except Exception: |
116 pass | 116 pass |
117 | 117 |