# HG changeset patch # User Chris Cannam # Date 1416910249 0 # Node ID fe83d6d7842936c877bc17af19b8ef0bed534c09 # Parent 4b9adb4b532f34a17ada915bfba3923709f2b2a4 More tests diff -r 4b9adb4b532f -r fe83d6d78429 test_metadata.py --- a/test_metadata.py Tue Nov 25 09:58:25 2014 +0000 +++ b/test_metadata.py Tue Nov 25 10:10:49 2014 +0000 @@ -5,8 +5,8 @@ ##!!! could use: plugin version -def test_enumerate(): - plugins = vh.enumeratePlugins() +def test_list(): + plugins = vh.listPlugins() if testPluginKey not in plugins: print("Test plugin " + testPluginKey + " not installed or not returned by enumerate: can't run any tests without it") assert testPluginKey in plugins @@ -16,11 +16,11 @@ assert len(path) > 0 def test_getlibrary(): - lib = vh.getLibraryForPlugin(testPluginKey) + lib = vh.getLibraryFor(testPluginKey) assert lib != "" def test_getoutputlist(): - outputs = vh.getOutputList(testPluginKey) + outputs = vh.getOutputsOf(testPluginKey) assert len(outputs) == 8 assert "curve-vsr" in outputs diff -r 4b9adb4b532f -r fe83d6d78429 test_process.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test_process.py Tue Nov 25 10:10:49 2014 +0000 @@ -0,0 +1,25 @@ + +import vampyhost as vh + +testPluginKey = "vamp-test-plugin:vamp-test-plugin" + +rate = 44100 + +def test_load_unload(): + plug = vh.loadPlugin(testPluginKey, rate) + vh.unloadPlugin(plug) + try: + vh.unloadPlugin(plug) # should throw but not crash + assert(False) + except AttributeError: + pass + +def test_process_without_initialise(): + plug = vh.loadPlugin(testPluginKey, rate) + try: + vh.process(plug, [[1,2,3,4]], vh.RealTime(0, 0)) + assert(False) + except StandardError: + pass + +