comparison test/test_metadata.py @ 82:a11b57e9fb0b

naming: module methods snake_case
author Chris Cannam
date Wed, 21 Jan 2015 12:43:50 +0000
parents 650f0697812f
children
comparison
equal deleted inserted replaced
81:0a2f2e7803ea 82:a11b57e9fb0b
1 1
2 import vampyhost as vh 2 import vampyhost as vh
3 3
4 testPluginKey = "vamp-test-plugin:vamp-test-plugin" 4 plugin_key = "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.list_plugins() 9 plugins = vh.list_plugins()
10 if testPluginKey not in plugins: 10 if plugin_key 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 " + plugin_key + " not installed or not returned by enumerate: can't run any tests without it")
12 assert testPluginKey in plugins 12 assert plugin_key in plugins
13 13
14 def test_path(): 14 def test_path():
15 path = vh.get_plugin_path() 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.get_library_for(testPluginKey) 19 lib = vh.get_library_for(plugin_key)
20 assert lib.find("vamp-test-plugin") >= 0 20 assert lib.find("vamp-test-plugin") >= 0
21 try: 21 try:
22 lib = vh.get_library_for("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: