From: Paul Brossier Date: Thu, 1 Nov 2007 13:06:31 +0000 (+0100) Subject: aubioonset test: make sure default parameters detect the woodblock X-Git-Tag: bzr2git~498 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9f9f63f8515bed59717ea901fd6b1a78fe84b31d;p=aubio.git aubioonset test: make sure default parameters detect the woodblock --- diff --git a/tests/python/examples/aubioonset.py b/tests/python/examples/aubioonset.py index 1b0f4abc..e40d23c3 100644 --- a/tests/python/examples/aubioonset.py +++ b/tests/python/examples/aubioonset.py @@ -9,6 +9,9 @@ class aubioonset_test_case(program_test_case): def test_aubioonset(self): """ test aubioonset with default parameters """ self.getOutput() + assert len(self.output) != 0, self.output + assert len(str(self.output)) != 0, "no output produced with command:\n" \ + + self.command def test_aubioonset_with_inf_silence(self): """ test aubioonset with -s 0 """ @@ -22,7 +25,8 @@ class aubioonset_test_case(program_test_case): self.getOutput() # only one onset in woodblock.aiff assert len(self.output.split('\n')) == 1 - assert len(str(self.output)) != 0, "no output produced with command:\n" + self.command + assert len(str(self.output)) != 0, "no output produced with command:\n" \ + + self.command # onset should be at 0.00000 assert float(self.output.strip()) == 0. @@ -43,7 +47,7 @@ class aubioonset_test_case_complex(aubioonset_test_case): aubioonset_test_case.setUp(self, options = options) class aubioonset_test_case_phase(aubioonset_test_case): - def setUp(self, options = " -O phase "): + def setUp(self, options = " -O phase"): aubioonset_test_case.setUp(self, options = options) class aubioonset_test_case_kl(aubioonset_test_case): @@ -55,4 +59,5 @@ class aubioonset_test_case_mkl(aubioonset_test_case): aubioonset_test_case.setUp(self, options = options) if __name__ == '__main__': + unittest.main()