Changeset 100f950 for tests/python/examples/aubioonset.py
- Timestamp:
- Nov 1, 2007, 4:40:15 PM (16 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 1da7e08, d6f515d
- Parents:
- cea30b8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/python/examples/aubioonset.py
rcea30b8 r100f950 10 10 """ test aubioonset with default parameters """ 11 11 self.getOutput() 12 assert len(self.output) != 0, self.output13 12 assert len(str(self.output)) != 0, "no output produced with command:\n" \ 14 13 + self.command … … 25 24 self.getOutput() 26 25 # only one onset in woodblock.aiff 27 assert len(self.output.split('\n')) == 128 26 assert len(str(self.output)) != 0, "no output produced with command:\n" \ 29 27 + self.command 28 assert len(self.output.split('\n')) == 1 30 29 # onset should be at 0.00000 31 30 assert float(self.output.strip()) == 0. 32 31 33 class aubioonset_test_case_energy(aubioonset_test_case):34 def setUp(self, options = " -O energy "):35 aubioonset_test_case.setUp(self, options = options)32 for name in ["energy", "specdiff", "hfc", "complex", "phase", "kl", "mkl"]: 33 exec("class aubioonset_test_case_"+name+"(aubioonset_test_case):\n\ 34 options = \" -O "+name+" \"") 36 35 37 class aubioonset_test_case_specdiff(aubioonset_test_case): 38 def setUp(self, options = " -O specdiff "): 39 aubioonset_test_case.setUp(self, options = options) 40 41 class aubioonset_test_case_hfc(aubioonset_test_case): 42 def setUp(self, options = " -O hfc "): 43 aubioonset_test_case.setUp(self, options = options) 44 45 class aubioonset_test_case_complex(aubioonset_test_case): 46 def setUp(self, options = " -O complex "): 47 aubioonset_test_case.setUp(self, options = options) 48 49 class aubioonset_test_case_phase(aubioonset_test_case): 50 def setUp(self, options = " -O phase"): 51 aubioonset_test_case.setUp(self, options = options) 52 53 class aubioonset_test_case_kl(aubioonset_test_case): 54 def setUp(self, options = " -O kl "): 55 aubioonset_test_case.setUp(self, options = options) 56 57 class aubioonset_test_case_mkl(aubioonset_test_case): 58 def setUp(self, options = " -O mkl "): 59 aubioonset_test_case.setUp(self, options = options) 60 61 if __name__ == '__main__': 62 63 unittest.main() 36 if __name__ == '__main__': unittest.main()
Note: See TracChangeset
for help on using the changeset viewer.