ref: 980a4f421f51f6f78f47ad69f40e8947254a1d8c
parent: 7a83a47a56870b91af549d8f1246b872af63503f
author: Paul Brossier <piem@piem.org>
date: Tue Sep 20 21:34:33 EDT 2016
python/tests/test_source.py: use nose2 params to process one sound file per test
--- a/python/tests/test_source.py
+++ b/python/tests/test_source.py
@@ -27,20 +27,20 @@
class aubio_source_test_case(aubio_source_test_case_base):
- def test_close_file(self):
+ @params(*list_of_sounds)
+ def test_close_file(self, filename):
samplerate = 0 # use native samplerate
hop_size = 256
- for p in list_of_sounds:
- f = source(p, samplerate, hop_size)
- f.close()
+ f = source(filename, samplerate, hop_size)
+ f.close()
- def test_close_file_twice(self):
+ @params(*list_of_sounds)
+ def test_close_file_twice(self, filename):
samplerate = 0 # use native samplerate
hop_size = 256
- for p in list_of_sounds:
- f = source(p, samplerate, hop_size)
- f.close()
- f.close()
+ f = source(filename, samplerate, hop_size)
+ f.close()
+ f.close()
class aubio_source_read_test_case(aubio_source_test_case_base):