Index: tests/python/examples/aubionotes.py
===================================================================
--- tests/python/examples/aubionotes.py	(revision cea30b8952f7aa2d7f5c4c8b27f34f1ee1fb5053)
+++ tests/python/examples/aubionotes.py	(revision 100f950c3a113aab914a8a828445e8b6d2b63224)
@@ -5,5 +5,5 @@
   import os.path
   filename = os.path.join('..','..','sounds','woodblock.aiff')
-  progname = os.path.join('..','..','examples','aubioonset')
+  progname = os.path.join('..','..','examples','aubionotes')
 
   def test_aubionotes(self):
@@ -11,5 +11,6 @@
     self.getOutput()
     # FIXME: useless check
-    assert len(self.output) >= 0
+    self.assertEqual(len(self.output.split('\n')), 1)
+    self.assertEqual(float(self.output.strip()), 0.017415)
 
   def test_aubionotes_verbose(self):
@@ -24,6 +25,5 @@
     self.filename = "/dev/null"
     # exit status should not be 0
-    self.getOutput(expected_status = -1)
-    assert self.status != 0
+    self.getOutput(expected_status = 256)
     # and there should be an error message
     assert len(self.output) > 0
@@ -34,3 +34,8 @@
     assert output_lines[2] == "Could not open input file /dev/null."
 
+mode_names = ["yinfft", "yin", "fcomb", "mcomb", "schmitt"]
+for name in mode_names:
+  exec("class aubionotes_test_case_" + name + "(aubionotes_test_case):\n\
+    options = \" -p " + name + " \"")
+
 if __name__ == '__main__': unittest.main()
Index: tests/python/examples/aubioonset.py
===================================================================
--- tests/python/examples/aubioonset.py	(revision cea30b8952f7aa2d7f5c4c8b27f34f1ee1fb5053)
+++ tests/python/examples/aubioonset.py	(revision 100f950c3a113aab914a8a828445e8b6d2b63224)
@@ -10,5 +10,4 @@
     """ 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
@@ -25,39 +24,13 @@
     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(self.output.split('\n')) == 1
     # onset should be at 0.00000
     assert float(self.output.strip()) == 0.
 
-class aubioonset_test_case_energy(aubioonset_test_case):
-  def setUp(self, options = " -O energy "):
-    aubioonset_test_case.setUp(self, options = options)
+for name in ["energy", "specdiff", "hfc", "complex", "phase", "kl", "mkl"]:
+  exec("class aubioonset_test_case_"+name+"(aubioonset_test_case):\n\
+  options = \" -O "+name+" \"")
 
-class aubioonset_test_case_specdiff(aubioonset_test_case):
-  def setUp(self, options = " -O specdiff "):
-    aubioonset_test_case.setUp(self, options = options)
-
-class aubioonset_test_case_hfc(aubioonset_test_case):
-  def setUp(self, options = " -O hfc "):
-    aubioonset_test_case.setUp(self, options = options)
-
-class aubioonset_test_case_complex(aubioonset_test_case):
-  def setUp(self, options = " -O complex "):
-    aubioonset_test_case.setUp(self, options = options)
-
-class aubioonset_test_case_phase(aubioonset_test_case):
-  def setUp(self, options = " -O phase"):
-    aubioonset_test_case.setUp(self, options = options)
-
-class aubioonset_test_case_kl(aubioonset_test_case):
-  def setUp(self, options = " -O kl "):
-    aubioonset_test_case.setUp(self, options = options)
-
-class aubioonset_test_case_mkl(aubioonset_test_case):
-  def setUp(self, options = " -O mkl "):
-    aubioonset_test_case.setUp(self, options = options)
-
-if __name__ == '__main__':
-
-  unittest.main()
+if __name__ == '__main__': unittest.main()
Index: tests/python/examples/template.py
===================================================================
--- tests/python/examples/template.py	(revision cea30b8952f7aa2d7f5c4c8b27f34f1ee1fb5053)
+++ tests/python/examples/template.py	(revision 100f950c3a113aab914a8a828445e8b6d2b63224)
@@ -7,7 +7,5 @@
   progname = "UNDEFINED"
   command = ""
-
-  def setUp(self, options = ""):
-    self.options = options 
+  options = ""
 
   def getOutput(self, expected_status = 0):
