Changeset 212da72 for tests/python/examples/aubioonset.py
- Timestamp:
- Dec 3, 2007, 10:57:52 AM (17 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:
- 45f1f06
- Parents:
- dddf1f5 (diff), 6913434 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/python/examples/aubioonset.py
rdddf1f5 r212da72 1 1 from template import * 2 2 3 class aubioonset_ test_case(program_test_case):3 class aubioonset_unit(program_test_case): 4 4 5 5 import os.path … … 24 24 self.getOutput() 25 25 # only one onset in woodblock.aiff 26 assert len(str(self.output)) != 0, "no output produced with command:\n"\27 + self.command28 assert len(self.output.split('\n')) == 126 self.assertNotEqual(0, len(str(self.output)), \ 27 "no output produced with command:\n" + self.command) 28 self.assertEqual(1, len(self.output.split('\n')) ) 29 29 # onset should be at 0.00000 30 assert float(self.output.strip()) == 0.30 self.assertEqual(0, float(self.output.strip())) 31 31 32 for name in ["energy", "specdiff", "hfc", "complex", "phase", "kl", "mkl"]: 33 exec("class aubioonset_test_case_"+name+"(aubioonset_test_case):\n\ 32 list_of_onset_modes = ["energy", "specdiff", "hfc", "complex", "phase", \ 33 "kl", "mkl", "specflux"] 34 35 for name in list_of_onset_modes: 36 exec("class aubioonset_"+name+"_unit(aubioonset_unit):\n\ 34 37 options = \" -O "+name+" \"") 35 38
Note: See TracChangeset
for help on using the changeset viewer.