Mercurial > hg > vampy-host
comparison test/test_metadata.py @ 79:650f0697812f
naming: vampyhost module methods snake_case
author | Chris Cannam |
---|---|
date | Wed, 21 Jan 2015 12:28:16 +0000 |
parents | b56513f872a5 |
children | a11b57e9fb0b |
comparison
equal
deleted
inserted
replaced
78:f61ca3c81272 | 79:650f0697812f |
---|---|
4 testPluginKey = "vamp-test-plugin:vamp-test-plugin" | 4 testPluginKey = "vamp-test-plugin:vamp-test-plugin" |
5 | 5 |
6 ##!!! could use: plugin version | 6 ##!!! could use: plugin version |
7 | 7 |
8 def test_list(): | 8 def test_list(): |
9 plugins = vh.listPlugins() | 9 plugins = vh.list_plugins() |
10 if testPluginKey not in plugins: | 10 if testPluginKey not in plugins: |
11 print("Test plugin " + testPluginKey + " not installed or not returned by enumerate: can't run any tests without it") | 11 print("Test plugin " + testPluginKey + " not installed or not returned by enumerate: can't run any tests without it") |
12 assert testPluginKey in plugins | 12 assert testPluginKey in plugins |
13 | 13 |
14 def test_path(): | 14 def test_path(): |
15 path = vh.getPluginPath() | 15 path = vh.get_plugin_path() |
16 assert len(path) > 0 | 16 assert len(path) > 0 |
17 | 17 |
18 def test_getlibrary(): | 18 def test_getlibrary(): |
19 lib = vh.getLibraryFor(testPluginKey) | 19 lib = vh.get_library_for(testPluginKey) |
20 assert lib.find("vamp-test-plugin") >= 0 | 20 assert lib.find("vamp-test-plugin") >= 0 |
21 try: | 21 try: |
22 lib = vh.getLibraryFor("not a well-formatted plugin key") | 22 lib = vh.get_library_for("not a well-formatted plugin key") |
23 assert False | 23 assert False |
24 except TypeError: | 24 except TypeError: |
25 pass | 25 pass |
26 lib = vh.getLibraryFor("nonexistent-library:nonexistent-plugin") | 26 lib = vh.get_library_for("nonexistent-library:nonexistent-plugin") |
27 assert lib == "" | 27 assert lib == "" |
28 | 28 |