Index: python/tests/test_sink.py
===================================================================
--- python/tests/test_sink.py	(revision 797435fd6f405b18b4370f2bde7e4b8f7852496b)
+++ python/tests/test_sink.py	(revision 2fe24df68e8d321f51d40c3d31f06c676ff0419c)
@@ -2,4 +2,5 @@
 
 from numpy.testing import TestCase, assert_equal, assert_almost_equal
+from nose2.tools import params
 from aubio import fvec, source, sink
 from numpy import array
@@ -7,9 +8,22 @@
 
 list_of_sounds = list_all_sounds('sounds')
+samplerates = [0, 44100, 8000, 32000]
+hop_sizes = [512, 1024, 64]
+
 path = None
 
 many_files = 300 # 256 opened files is too much
 
+all_params = []
+for soundfile in list_of_sounds:
+    for hop_size in hop_sizes:
+        for samplerate in samplerates:
+            all_params.append((hop_size, samplerate, soundfile))
+
 class aubio_sink_test_case(TestCase):
+
+    def setUp(self):
+        if not len(list_of_sounds):
+            self.skipTest('add some sound files in \'python/tests/sounds\'')
 
     def test_many_sinks(self):
@@ -30,41 +44,38 @@
         shutil.rmtree(tmpdir)
 
-    def test_read_and_write(self):
+    @params(*all_params)
+    def test_read_and_write(self, hop_size, samplerate, path):
 
-        if not len(list_of_sounds):
-            self.skipTest('add some sound files in \'python/tests/sounds\'')
+        try:
+            f = source(path, samplerate, hop_size)
+        except RuntimeError as e:
+            self.skipTest('failed opening with hop_s = {:d}, samplerate = {:d} ({:s})'.format(hop_size, samplerate, e))
+        if samplerate == 0: samplerate = f.samplerate
+        sink_path = get_tmp_sink_path()
+        g = sink(sink_path, samplerate)
+        total_frames = 0
+        while True:
+            vec, read = f()
+            g(vec, read)
+            total_frames += read
+            if read < f.hop_size: break
+        del_tmp_sink_path(sink_path)
 
-        for path in list_of_sounds:
-            for samplerate, hop_size in zip([0, 44100, 8000, 32000], [512, 1024, 64, 256]):
-                f = source(path, samplerate, hop_size)
-                if samplerate == 0: samplerate = f.samplerate
-                sink_path = get_tmp_sink_path()
-                g = sink(sink_path, samplerate)
-                total_frames = 0
-                while True:
-                    vec, read = f()
-                    g(vec, read)
-                    total_frames += read
-                    if read < f.hop_size: break
-                del_tmp_sink_path(sink_path)
-
-    def test_read_and_write_multi(self):
-
-        if not len(list_of_sounds):
-            self.skipTest('add some sound files in \'python/tests/sounds\'')
-
-        for path in list_of_sounds:
-            for samplerate, hop_size in zip([0, 44100, 8000, 32000], [512, 1024, 64, 256]):
-                f = source(path, samplerate, hop_size)
-                if samplerate == 0: samplerate = f.samplerate
-                sink_path = get_tmp_sink_path()
-                g = sink(sink_path, samplerate, channels = f.channels)
-                total_frames = 0
-                while True:
-                    vec, read = f.do_multi()
-                    g.do_multi(vec, read)
-                    total_frames += read
-                    if read < f.hop_size: break
-                del_tmp_sink_path(sink_path)
+    @params(*all_params)
+    def test_read_and_write_multi(self, hop_size, samplerate, path):
+        try:
+            f = source(path, samplerate, hop_size)
+        except RuntimeError as e:
+            self.skipTest('failed opening with hop_s = {:d}, samplerate = {:d} ({:s})'.format(hop_size, samplerate, e))
+        if samplerate == 0: samplerate = f.samplerate
+        sink_path = get_tmp_sink_path()
+        g = sink(sink_path, samplerate, channels = f.channels)
+        total_frames = 0
+        while True:
+            vec, read = f.do_multi()
+            g.do_multi(vec, read)
+            total_frames += read
+            if read < f.hop_size: break
+        del_tmp_sink_path(sink_path)
 
     def test_close_file(self):
@@ -84,4 +95,4 @@
 
 if __name__ == '__main__':
-    from unittest import main
+    from nose2 import main
     main()
