comparison test/test_collect.py @ 82:a11b57e9fb0b

naming: module methods snake_case
author Chris Cannam
date Wed, 21 Jan 2015 12:43:50 +0000
parents cb0380c92c42
children 78844c4b329c
comparison
equal deleted inserted replaced
81:0a2f2e7803ea 82:a11b57e9fb0b
1 1
2 import vamp 2 import vamp
3 import numpy as np 3 import numpy as np
4 4
5 testPluginKey = "vamp-test-plugin:vamp-test-plugin" 5 plugin_key = "vamp-test-plugin:vamp-test-plugin"
6 testPluginKeyFreq = "vamp-test-plugin:vamp-test-plugin-freq" 6 plugin_key_freq = "vamp-test-plugin:vamp-test-plugin-freq"
7 7
8 rate = 44100 8 rate = 44100
9 9
10 # Throughout this file we have the assumption that the plugin gets run with a 10 # Throughout this file we have the assumption that the plugin gets run with a
11 # blocksize of 1024, and with a step of 1024 for the time-domain version or 512 11 # blocksize of 1024, and with a step of 1024 for the time-domain version or 512
19 # start at 1, not 0 so that all elts are non-zero 19 # start at 1, not 0 so that all elts are non-zero
20 return np.arange(n) + 1 20 return np.arange(n) + 1
21 21
22 def test_collect_runs_at_all(): 22 def test_collect_runs_at_all():
23 buf = input_data(blocksize) 23 buf = input_data(blocksize)
24 results = vamp.collect(buf, rate, testPluginKey, {}, "input-summary") 24 results = vamp.collect(buf, rate, plugin_key, {}, "input-summary")
25 assert type(results) == dict 25 assert type(results) == dict